Closed
Bug 268833
Opened 20 years ago
Closed 20 years ago
Date.getYear() returns wrong value.
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
People
(Reporter: manoj.kurmi, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
The url I have provided contains the code to display today's date. The output
displayed is not correct. The correct is 11-10-2004 but instead it displays
11-10-104.
So correct output should be:
JavaScript says today's date is 11-10-2004
But instead Firefox displays it as
JavaScript says today's date is 11-10-104
Reproducible: Always
Steps to Reproduce:
1. Open the http://www.ucsolutions.com/js/ls2.htm
2. See the displayed line: JavaScript says today's date is 11-10-104
Actual Results:
Incorrect date year is displayed i.e.
11-10-104
Expected Results:
The correct output should have been
11-10-2004
Comment 1•20 years ago
|
||
Do not use product=Rhino to file bugs about Firefox etc as Rhino has NOTHING to
do with Mozilla/Firefox!
Component: Core → JavaScript Engine
Product: Rhino → Browser
Version: other → Trunk
Updated•20 years ago
|
Assignee: igor → general
Comment 2•20 years ago
|
||
Date.prototype.getYear() is a deprecated function in ECMAScript 262 and the
standard requires for it to return the current year - 1900 and confirming
scripts should use Date.prototype.getFullYear() instead.
Please inform the site writer to use Date.prototype.getFullYear().
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Updated•20 years ago
|
Whiteboard: DUPEME
Updated•20 years ago
|
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Comment 3•20 years ago
|
||
*** This bug has been marked as a duplicate of 100123 ***
Status: REOPENED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → DUPLICATE
Whiteboard: DUPEME
Updated•20 years ago
|
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Status: VERIFIED → REOPENED
Resolution: DUPLICATE → ---
Comment 4•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
•