Closed
Bug 161273
Opened 22 years ago
Closed 20 years ago
Y2K bug when using dateobject.getYear
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
People
(Reporter: reisilv, Assigned: rogerl)
Details
Reporter | ||
Comment 1•22 years ago
|
||
When using dateobject.getYear() for dates beyond year 2000 I got the result as year-1900 instead of the full 4-digit year, what I should get according to the Javascript reference guide.
Comment 2•22 years ago
|
||
This is not a bug. getYear() is deprecated and kept as-is to preserve backwards compatbility. Use getFullYear(). see comments in bug 22964, bug 45764, bug 58241, bug 65681, bug 82354 *** This bug has been marked as a duplicate of 100123 *** *** This bug has been marked as a duplicate of 100123 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Comment 3•22 years ago
|
||
As a note, getYear() is no longer in the JavaScript standard...
Comment 4•22 years ago
|
||
Marking Verified - Reinaldo, thank you for this report. The solution is to use .getFullYear() instead of getYear(). For a history on how the ECMA standard changed on this subject, and how Netscape and Microsoft came to differ on the behavior of .getYear(), see bug 45764.
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Status: VERIFIED → UNCONFIRMED
Resolution: DUPLICATE → ---
Comment 5•20 years ago
|
||
*** This bug has been marked as a duplicate of 22964 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago → 20 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•