Closed Bug 131280 Opened 23 years ago Closed 22 years ago

Date script does not work

Categories

(Tech Evangelism Graveyard :: English US, defect)

x86
Windows 98
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: maxozilla, Assigned: doronr)

References

()

Details

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.9) Gecko/20020311 BuildID: 2002031104 When going on http://maximusonline.netfirms.com/ , the date script at the top right corner doesn't work. Instead of displaying '2002' , it displays '102'. In Internet Explorer, it displays '2002'. Reproducible: Always Steps to Reproduce: 1. Go to http://maximusonline.netfirms.com/ 2. You will see the date script at the top doesn't display '2002'. It displays '102'. Actual Results: It displayed '102' instead of '2002'. Expected Results: It should have displayed '2002'. The Konqueror Web browser also seems to have this bug.
Whiteboard: DUPEME
Page uses JavaScript code: [...] Year = (myvar.getYear()) Marking dupe of bug 100123. *** This bug has been marked as a duplicate of 100123 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Whiteboard: DUPEME
Olivier is right, but let me re-open this bug so the site can be evangelized. Here is the JavaScript they use to print the date: myvar = new Date(); Month = (myvar.getMonth() + 1) Year = (myvar.getYear()) if (Month == 1) {WordMonth = "January";} etc. document.write(WordMonth + " " + myvar.getDate() + ", " + Year);
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Reassigning to Tech Evangelism. The getYear() method is behaving according to spec. (see ECMA-262 Edition 3 Final, Section B.2.4) This is available at http://www.mozilla.org/js/language The getYear() method has been superseded by the getFullYear() method. For more details, see bug 22964 and bug 45764. Although IE behaves differently on this, the site should use getFullYear(), not getYear().
Assignee: rogerl → doronr
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → US General
Ever confirmed: true
Product: Browser → Tech Evangelism
QA Contact: pschwartau → zach
Version: other → unspecified
The site should use getfullyear() (and it does now!) but some sites won't change their code to this - thus, getyear() should be put into mozillla too to avoid millions of sites having to change their code!
Resolving Fixed This site has been changed now.
Status: NEW → RESOLVED
Closed: 23 years ago22 years ago
Resolution: --- → FIXED
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.