JRS: In article <69****************@PointedEars.de>, dated Sun, 27 Nov
2005 12:55:10, seen in news:comp.lang.javascript, Thomas 'PointedEars'
Lahn <Po*********@web.de> posted :
if (!Date.prototype.getFullYear)
{
Date.prototype.getFullYear = function()
{
var y = this.getYear();
return (y < 1900 ? y + 1900 : y);
}
}
AIUI, that is not correct for at least one browser, which implements
getYear() to give (at least around 2000) what getFullYear()%100 gives.
However, one can write a function getFY - not much longer than the
above - that is safe on any browser for which getYear()%100 is
always right. Read the newsgroup FAQ; see below.
--
© 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.