Closed
Bug 269756
Opened 21 years ago
Closed 21 years ago
today.getYear() returns 104 instead of 2004
Categories
(Firefox :: General, defect)
Tracking
()
People
(Reporter: radxcell, Assigned: bugzilla)
References
()
Details
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Neostrada Plus 5.6; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Basically the summary says it all - JS does not work correctly, as the function
today.getYear() returns 104 and not 2004 for the current year.
Reproducible: Always
Steps to Reproduce:
1. Make a short test html with today.getYear() function.
2. Check on returned value
Actual Results:
The function returned 104
Expected Results:
The function should imho return 2004
Yes, JS does not work correctly, but it's JScript not JavaScript.
JScript breaks the compatibility after the first version.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/js56jsmthgetyear.asp
BTW, you should use Date.getFullYear() today.
![]() |
||
Comment 2•21 years ago
|
||
*** This bug has been marked as a duplicate of 22964 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Updated•21 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•