Closed Bug 518574 Opened 16 years ago Closed 16 years ago

incorrect javascript year for Date.getYear()

Categories

(Firefox :: General, defect)

x86
Windows Vista
defect
Not set
major

Tracking

()

VERIFIED DUPLICATE of bug 22964

People

(Reporter: sujith_pitadeniya, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729) try this script in firefox 3.5.3 as the URL javascript:var tem =new Date();alert(tem.getYear()); says 109 instead of 2009. looks like the default starting year 1900 has set to 0 in new browser thus 109 for 2009 Reproducible: Always Steps to Reproduce: 1.javascript:var tem =new Date();alert(tem.getYear()); 2. 3. Actual Results: 109 Expected Results: 2009
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
getYear() used to work differently in Netscape (standards compliant) and Internet Explorer (not standards compliant). That's why the 1.5 standard says that you should sue getFullYear().
Status: RESOLVED → VERIFIED
Resolution: INVALID → DUPLICATE
You need to log in before you can comment on or make changes to this bug.