Closed
Bug 238030
Opened 21 years ago
Closed 21 years ago
The year returned by Javascript Engine is 104 instead of 2004
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
People
(Reporter: harmen, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113
If I run this code, on M$IE it works abouit right, it returns the current year.
When I run it on Mozilla (1.6), I get the year 104 instead of 2004. Y2K bug in
software written in 2003-2004? ;)
Code:
var now = new Date();
var Year = now.getYear();
document.write ("Year: " + Year);
Reproducible: Always
Steps to Reproduce:
1. create a JScript file
2. create a webpage, and include a <script src=''>-tag
3. look at the result :)
Actual Results:
The year returned is incorrect, 104.
Expected Results:
Given the correct year, 2004.
Comment 1•21 years ago
|
||
use getFullYear()
*** This bug has been marked as a duplicate of 22964 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•