LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] D'oh - Y3K bug

[ILUG] D'oh - Y3K bug

Fergal Daly fergal at esatclear.ie
Mon Jan 3 16:04:59 GMT 2000


At 15:40 03/01/00 -0000, John O'Donovan wrote:
>Bug In Internet Explorer may report year as 3900:
>http://betanews.efront.com/article.php3?sid=story386ec94458d2c

There are lots of people defending MS there because they stuck to the spec,
but when you read the spec you'll see there is no excuse for sticking to it.

JavaScript 1.2 and earlier versions. The getYear method returns either a
2-digit or 4-digit year:

     For years between and including 1900 and 1999, the value returned by
getYear is the year minus 1900. For
     example, if the year is 1976, the value returned is 76. 

     For years less than 1900 or greater than 1999, the value returned by
getYear is the four-digit year. For example, if
     the year is 1856, the value returned is 1856. If the year is 2026, the
value returned is 2026. 


It's laughable that someone actually went and correctly implemented this -
what happens for years between 0 and 99?

Fergal






More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell