Closed
Bug 224265
Opened 21 years ago
Closed 20 years ago
Date.getYear() not Y2K compliant.
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
People
(Reporter: unidyne, Unassigned)
Details
User-Agent: Mozilla/4.78 (Windows; U; Win98; en-US; rv:1.0.0)
Build Identifier: Camino 0.7, Firebird 0.7, Mozilla 1.5
(new Date()).getYear();
will return 103 for the year 2003.
Other browsers (Explorer, Safari, Konqueror) all return the Y2K compliant year.
Reproducible: Always
Steps to Reproduce:
1. Call (new Date()).getYear()
2. Stare in horror at the pre-Y2K year returned.
Actual Results:
Returned a non-Y2K compliant year (103)
Expected Results:
Returned a Y2K compliant year (2003)
The workaround for this is to add 1900 to the date if and only if the current
browser is Mozilla or one of it's cousins. Of course, this isn't always doable -
especially if you are working with dates BEFORE 1900.
Comment 1•21 years ago
|
||
103 is correct
*** This bug has been marked as a duplicate of 45764 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 2•21 years ago
|
||
Sorry for the duplicate. Didn't show up in the Bugzilla search. Thanks for the
quick response.
Comment 3•21 years ago
|
||
> Didn't show up in the Bugzilla search.
That's because you only searched open bugs... (that's the search default,
unfortunately).
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Status: VERIFIED → UNCONFIRMED
Resolution: DUPLICATE → ---
Comment 4•20 years ago
|
||
*** This bug has been marked as a duplicate of 22964 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago → 20 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•