Incorrect date of JavaScript file

RESOLVED DUPLICATE of bug 22964

Status

()

Firefox
General
--
major
RESOLVED DUPLICATE of bug 22964
11 years ago
11 years ago

People

(Reporter: Nico van de Water, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6

I am writing a web site, and for the (system) date display I use the following JavaScript:

var mydate=new Date()
var year=mydate.getYear()
if (year < 1000) year+=2000
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10) daym="0"+daym
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
document.write("<br />"+dayarray[day]+",<br />"+daym+" "+montharray[month]+" "+year+"")

Invariably, the date displayed contains the year 2106, while the same date is displayed as 2006 in MS IE 6.0. Any solutions to this?

With thanks and regards,

Nico van de Water.

Reproducible: Always

Steps to Reproduce:
1. Open the home.html file in Mozilla Firefox by double-clicking.
2. In Firefox, the date always contains 2106.
3.

Actual Results:  
Date displayed contains 2106.

Expected Results:  
Date displayed should contain 2006.

None

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