Closed Bug 268833 Opened 20 years ago Closed 20 years ago

Date.getYear() returns wrong value.

Categories

(Core :: JavaScript Engine, defect)

x86
Windows 2000
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 22964

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
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
Assignee: igor → general
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
Whiteboard: DUPEME
Status: RESOLVED → REOPENED
Resolution: INVALID → ---

*** This bug has been marked as a duplicate of 100123 ***
Status: REOPENED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → DUPLICATE
Whiteboard: DUPEME
Status: RESOLVED → VERIFIED
Status: VERIFIED → REOPENED
Resolution: DUPLICATE → ---

*** This bug has been marked as a duplicate of 22964 ***
Status: REOPENED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.