JRS: In article <Tc********************@comcast.com>, dated Mon, 27 Jun
2005 12:10:25, seen in news:comp.lang.javascript, McKirahan
<Ne**@McKirahan.com> posted :
function getTime() {
var tNow = new Date();
document.getElementById("time").innerHTML = tNow.toLocaleTimeString();
}
Method toLocaleTimeString, though in ECMA-262, seems to be comparatively
recent; getElementById is also recent; the OP should be warned that your
code will not work in all browsers.
Since getTime is a method of the Date object, it seems unwise to re-use
that identifier for a distinct purpose.
The OP should note that "Locale" forms are not necessarily correctly
localised in all systems, and some may be ambiguous. IMHO, it's better
to code an unambiguous ISO 8601 form; no-one can misunderstand it, and
it annoys the rednecks.
Does anyone know if a Web page listing the versions at which the more
recent Date Object Methods were introduced in various browsers?
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.