Closed Bug 277740 Opened 20 years ago Closed 20 years ago

JavaScript: dateObject.getYear() returns an incorrect year.

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 22964

People

(Reporter: gremeth, Assigned: bugzilla)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

As shown in the page: http://www.twentysider.com/_dev_site/cal.html
The dateObject.getYear() method seems broken.

Reproduced easily with a small bit of JS:
var today = new Date();
document.writeln( today.getYear() );

This should print '2005' but prints '105' instead.

Reproducible: Always

Steps to Reproduce:
1. load http://www.twentysider.com/_dev_site/cal.html

Actual Results:  
The year reads 105

Expected Results:  
The year should read 2005
it's getFullYear()

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