Closed
Bug 133435
Opened 22 years ago
Closed 20 years ago
javascript Date().getYear() reports wrong year
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
People
(Reporter: bsc, Assigned: rogerl)
Details
The following code produces the alert that the month is 3 (correct) and the year is 102 (incorrect). The year should be 2002, not 102. Javascript should probally be y2k compliant in y2k2? <- cut -------- d = new Date(); Month = d.getMonth()+1; Year = d.getYear(); alert("Month: " + Month + " Year: " + Year); <- cut -------- Brian
see comments in dup *** This bug has been marked as a duplicate of 100123 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Comment 2•22 years ago
|
||
Marking Verified. The upshot is d.getYear() was deprecated in the ECMA-262 standard in favor of d.getFullYear() Here are various bugs with further information on this: bug 22964 bug 45764 <--- particuarly see last comment in this one for the history of this bug 100123 bug 115264
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Status: VERIFIED → UNCONFIRMED
Resolution: DUPLICATE → ---
Comment 3•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
•