Y2K bug rears its ugly head...again





  • I think that is the result of the fact that some browsers (Firefox for sure, possibly opera and safari too) evaluate the javascript function getyear() as an offset from 1900, as opposed to internet explorer, which returns the actual year.  The solution is to use getFullYear() instead, which returns the same on all of the browsers.



  • [quote user="rmr"]I think that is the result of the fact that some browsers (Firefox for sure, possibly opera and safari too) evaluate the javascript function getyear() as an offset from 1900, as opposed to internet explorer, which returns the actual year.  The solution is to use getFullYear() instead, which returns the same on all of the browsers.
    [/quote]

    Isn't javascript great? I can't understand why we don't use it for everything. 


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.