Closed Bug 221627 Opened 22 years ago Closed 22 years ago

displaying a date using js date function gives year as 103 instead of 2003

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

VERIFIED DUPLICATE of bug 22964

People

(Reporter: emansExtraSpace, Assigned: rogerl)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1 This is my personal webpage, all the coding should be easy for you guys to trace, I hand-coded the javascript...I display the date on the page listed above, on IE it displays fine. On Mozilla, the year comes out at 103 instead of 2003. Hope that helps. Reproducible: Always Steps to Reproduce: 1.load up the webpage 2.the date is located in the top right corner of the site. Actual Results: the date is displayed wrong, where in IE it diesplays correctly. Expected Results: load up the site in IE to see, but it should display a standard date "Month Day, Year". Hopefully this is just a problem with my site and not all javascript sites.
Sorry, have to mark this one invalid. Actually a duplicate. This issue comes up often, but getYear() has been deprecated, and getFullYear() should be used instead. See: bug 22964 bug 45764 (on how we came to differ with IE on this) bug 100123 Also see comments in bug 58241, bug 65681, bug 82354 *** This bug has been marked as a duplicate of 22964 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Marking Verified. If you replace getYear() with getFullYear(), your site will work fine in all browsers. That is how the spec for the JavaScript language evolved -
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.