Closed Bug 142496 Opened 23 years ago Closed 20 years ago

JS year isn't reported correctly with getYear()

Categories

(Core :: JavaScript Engine, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 22964

People

(Reporter: rich, Assigned: rogerl)

References

()

Details

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc1) Gecko/20020417 BuildID: 2002041711 If the following is done (as per example URL http://www.lightcomputers.com/), the year is occasionally reported incorrectly, vis. year = 102 instead of 2002. currentDate = new Date(); year = currentDate.getYear(); Upon checking with javscript:new Date(); in the location bar, the year is returned correectly, just not with getYear(). This has also been found on other sites. Reproducible: Sometimes Steps to Reproduce: 1. Open a new browser window or tab 2. Go to URL http://www.lightcomputers.com/ Actual Results: The year is reported incorrectly, in today's case the date is Mon May 6 102. Expected Results: Reported the year correctly, as in Mon May 6 2002 JS code: currentDate = new Date(); year = currentDate.getYear();
Please see comments in bug 100123 bug 45764 Other bugs with info: bug 22964 bug 100123 bug 115264 *** This bug has been marked as a duplicate of 100123 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
verified that getYear is not part of the ECMA standard and therefore defined by backwards-compatibility only.
Status: RESOLVED → VERIFIED
Rich, here is another nice URL on this: http://wipos.p.lodz.pl/zylla/opera/introdate.html
Status: VERIFIED → UNCONFIRMED
Resolution: DUPLICATE → ---
*** This bug has been marked as a duplicate of 22964 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.