Closed
Bug 100123
Opened 23 years ago
Closed 20 years ago
today.getYear() returns "101"
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
People
(Reporter: davidy, Assigned: rogerl)
References
()
Details
From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.4) Gecko/20010913 BuildID: 2001091303 Code below document.write(WhichDay[today.getDay()]+","+WhichMonth[today.getMonth()]+""+today.getDate()+", "+today.getYear()); yields Monday, September 17, 101 Reproducible: Always Steps to Reproduce: load page Actual Results: Year is "101" Expected Results: Year is "2001"
Comment 1•23 years ago
|
||
This is expected behavior for backward compatibility with Netscape 4.x. You should use today.getFullYear() instead. getFullYear returns the 4-digit year as desired. Marking invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Comment 2•23 years ago
|
||
See bug 45764 and bug 22964 for more details about the results from getYear in 4.x and mozilla. (Summary: getYear is depreciated in ECMA-262 and only getFullYear is necessary for compliance. Since getYear was returning 101 for 2001 as of 4.06, they decided to keep this behavior.)
Comment 3•23 years ago
|
||
Marking Verified - Thank you for this report. Please continue to use Bugzilla; we depend on contributors like you to catch the things we miss -
Status: RESOLVED → VERIFIED
*** Bug 114401 has been marked as a duplicate of this bug. ***
Comment 5•23 years ago
|
||
*** Bug 115264 has been marked as a duplicate of this bug. ***
Comment 6•22 years ago
|
||
*** Bug 129662 has been marked as a duplicate of this bug. ***
Comment 7•22 years ago
|
||
*** Bug 131280 has been marked as a duplicate of this bug. ***
*** Bug 133435 has been marked as a duplicate of this bug. ***
*** Bug 142496 has been marked as a duplicate of this bug. ***
Comment 10•22 years ago
|
||
*** Bug 153229 has been marked as a duplicate of this bug. ***
Comment 11•22 years ago
|
||
*** Bug 155995 has been marked as a duplicate of this bug. ***
Comment 12•22 years ago
|
||
*** Bug 161273 has been marked as a duplicate of this bug. ***
Comment 13•22 years ago
|
||
*** Bug 175253 has been marked as a duplicate of this bug. ***
Comment 14•22 years ago
|
||
*** Bug 180587 has been marked as a duplicate of this bug. ***
Comment 15•22 years ago
|
||
*** Bug 192241 has been marked as a duplicate of this bug. ***
Comment 16•20 years ago
|
||
*** Bug 236186 has been marked as a duplicate of this bug. ***
Comment 17•20 years ago
|
||
*** Bug 251437 has been marked as a duplicate of this bug. ***
Comment 18•20 years ago
|
||
*** Bug 251568 has been marked as a duplicate of this bug. ***
Comment 19•20 years ago
|
||
*** Bug 251568 has been marked as a duplicate of this bug. ***
Comment 20•20 years ago
|
||
*** Bug 261399 has been marked as a duplicate of this bug. ***
Comment 21•20 years ago
|
||
*** Bug 268361 has been marked as a duplicate of this bug. ***
Comment 22•20 years ago
|
||
*** Bug 268833 has been marked as a duplicate of this bug. ***
Comment 23•20 years ago
|
||
*** Bug 279128 has been marked as a duplicate of this bug. ***
Updated•20 years ago
|
Status: VERIFIED → UNCONFIRMED
Resolution: INVALID → ---
Comment 24•20 years ago
|
||
*** This bug has been marked as a duplicate of 22964 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago → 20 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•