Closed
Bug 160532
Opened 22 years ago
Closed 20 years ago
.getYear() is not returning absolute year
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
People
(Reporter: jdunn, Assigned: rogerl)
References
()
Details
Here is the snippet of code: <script language="javascript"> cYear = new Date(); document.write('© ' + cYear.getYear() + 'All Rights Reserved.'); </script> (someone else actually pointed this out and am not sure if this is a javascript or usage bug) IE display © 2002 All Rights Reserved. mozilla & 4.x display © 102 All Rights Reserved.
doh! I just read some more and using a function getYear() is not Y2K compliant and should be replaced with getFullYear() instead. SORRY!
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Comment 3•22 years ago
|
||
This bug contain an interesting history on how IE and Mozilla came to differ on getYear(): bug 45764, "Y2K error in .getYear()" http://bugzilla.mozilla.org/show_bug.cgi?id=45764#c4
Updated•20 years ago
|
Status: VERIFIED → REOPENED
Resolution: INVALID → ---
Comment 4•20 years ago
|
||
*** This bug has been marked as a duplicate of 45764 ***
Status: REOPENED → RESOLVED
Closed: 22 years ago → 20 years ago
Resolution: --- → DUPLICATE
Updated•20 years ago
|
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Comment 5•20 years ago
|
||
*** This bug has been marked as a duplicate of 22964 ***
Status: REOPENED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•