Closed
Bug 268361
Opened 20 years ago
Closed 20 years ago
Date object returns wrong year when calling getYear methode
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
People
(Reporter: j_hemelt, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041107 Firefox/0.9.1+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041107 Firefox/0.9.1+
If you create a Date object for the current date and call the getYear method the
method returns 104 instead of 2004.
Reproducible: Always
Steps to Reproduce:
1.Open Javascript Console
2.Enter following code: x = new Date(); x.getYear();
3.Press "evaluate"
Actual Results:
The displayed result is "104".
Expected Results:
The software should return the current year, in this case "2004".
Comment 1•20 years ago
|
||
You should use getFullYear(), not getYear.
*** This bug has been marked as a duplicate of 100123 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
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: 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
•