01-15-2012, 11:42 PM
I have this code to write the year which works fine in ie ff but apparantly is not working in google chrome.
I don't have chrome and so can't check can anybody tell me why chrome has an issue with it? What should I change to make it chrome compliant:-)
In ie ff it displays 2012 correctly but in chrome i'm told it is showing 112 ro something like that.
any help very much appreciated
01-16-2012, 12:12 AM
I am surprised you were getting the right year in firefox - I got 112 there as well. I note that getYear() is deprecated, but I assume it gives you how many years it has been since 1900.
or something useful like that.
I think getFullYear() is what you are after :thumbsup:
01-16-2012, 12:20 AM
Thanks for that --- didn't know getYear was deprecated.
Yeh ff was showing ok and usually for me if ff is ok and ie doesn't complain then i'm good hahaha
will change it later today
01-16-2012, 01:13 AM
getYear returns different results in different browsers because it isn't Y2K compliant. No attempt was made to make it compliant because it was deprecated with getFullYear replacing it in the late 1990s.
01-16-2012, 01:45 AM
Thanks for the info
I had that code lying around and I just used it while recently updating my site ---- it seemed fine in ie ff but was but was reported as not working correctly.
01-16-2012, 08:06 AM
01-16-2012, 10:48 AM
Updated site -- all's well now:-)
ie ff and chrome
01-16-2012, 12:11 PM