Closed Bug 261997 Opened 22 years ago Closed 22 years ago

Javascript Date() and getYear() are incompatible

Categories

(Firefox :: General, defect)

x86
Windows 98
defect
Not set
critical

Tracking

()

VERIFIED DUPLICATE of bug 22964

People

(Reporter: drcowsley, Assigned: bugzilla)

Details

User-Agent: Mozilla/5.0 (Windows; U; Win98; rv:1.7.3) Gecko/20040913 Firefox/0.10 Build Identifier: Mozilla/5.0 (Windows; U; Win98; rv:1.7.3) Gecko/20040913 Firefox/0.10 <script> now=new Date() alert (now.getYear()+" from "+now) </script> gets it horribly wrong. Reproducible: Always Steps to Reproduce: 1.Put the details above on a web page. 2.Load the page. 3.Whisper epithet Actual Results: The software puts the year in one place then looks for it in another. Expected Results: Used the same data specification for both routines? Any data collection web page that collects date and time automatically (eg for audit or sequencing purposes) will get corrupt data. I cannot use Firefox in house without an expensive and kludgy workaround that will take longer to write than I hope the bug will take to fix! Equipment would get double booked because prior bookings would end up in a different (random) year :(
Presumably you're referring to the fact that getYear() returns 104, that's because you should be using getFullYear() instead. *** This bug has been marked as a duplicate of 22964 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.