Closed Bug 65681 Opened 25 years ago Closed 20 years ago

time.getYear() returns wrong year

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 22964

People

(Reporter: ajp+mozilla, Assigned: rogerl)

References

()

Details

Go to http://www.neu.edu in Mozilla (Linux), and look at the date. instead of year 2001, it shows year 3901..?? Looks like a bug time.getYear(). I have reports that this works on a Mac in IE.
Nope, time.getYear() works fine. The problem with this site is that it checks if the user-agent is 'Netscape' and if so, adds 1900 to time.getYear() before displaying it, as below: ... if (navigator.appName == "Netscape") year=1900 + year; ... Don't know why.Perhaps in response to some Y2K bug in an older version of Netscape? Clumsy way of doing it. If so, I suppose this might go to Evangelism. Otherwise, Invalid.
Yeah, i guess.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
The use of Date.getYear() was deprecated in favour of .getFullYear() (which returns the full four-digit value for the year). See bug 22964 for further information on this - Verifying Invalid -
Status: RESOLVED → VERIFIED
*** Bug 123433 has been marked as a duplicate of this bug. ***
Status: VERIFIED → REOPENED
Resolution: INVALID → ---
*** This bug has been marked as a duplicate of 22964 ***
Status: REOPENED → RESOLVED
Closed: 25 years ago20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.