Closed Bug 160532 Opened 23 years ago Closed 21 years ago

.getYear() is not returning absolute year

Categories

(Core :: JavaScript Engine, defect)

x86
Windows NT
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 22964

People

(Reporter: jdunn, Assigned: rogerl)

References

()

Details

Here is the snippet of code: <script language="javascript"> cYear = new Date(); document.write('&copy; ' + 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: 23 years ago
Resolution: --- → INVALID
Verified.
Status: RESOLVED → VERIFIED
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
Status: VERIFIED → REOPENED
Resolution: INVALID → ---
*** This bug has been marked as a duplicate of 45764 ***
Status: REOPENED → RESOLVED
Closed: 23 years ago21 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
*** This bug has been marked as a duplicate of 22964 ***
Status: REOPENED → RESOLVED
Closed: 21 years ago21 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.