Javascript value of getYear() function returns "104" instead of "2004"

VERIFIED DUPLICATE of bug 22964

Status

SeaMonkey
General
VERIFIED DUPLICATE of bug 22964
15 years ago
14 years ago

People

(Reporter: John Wolf, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

15 years ago
User-Agent:       
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Firebird/0.7

try this yourself -- the variable thisyear should be 2004 not 104
<script language="JavaScript">
		today=new Date();
		var thisyear = today.getYear();
		document.write(thisyear);
</script>

Reproducible: Always
Steps to Reproduce:
1. create or visit a web page that contains javascript using getYear function
2. verify resulting value
3.

Actual Results:  
value produced should have been four-digit year "2004" -- but instead was three
digits "104" 

Expected Results:  
value should have been four-digit year, in this case "2004"

This anomoly occurred in: 
Firebird 0.7 running under Windows 2000
Firebird 0.7 running under Windows XP pro
Firebird 0.8 running under RedHat Linux 9.0

Comment 1

15 years ago
Bug is not specific to Firebird >>Browser-General
Assignee: blake → general
Component: General → Browser-General
Product: Firebird → Browser
Version: unspecified → Trunk

Comment 2

15 years ago
You have to use getFullYear() for the desired value.

See comment 2 in bug 22964.

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