Closed
Bug 233017
Opened 22 years ago
Closed 22 years ago
Javascript value of getYear() function returns "104" instead of "2004"
Categories
(SeaMonkey :: General, defect)
Tracking
(Not tracked)
People
(Reporter: john.wolf, Unassigned)
References
()
Details
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•22 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•22 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
Closed: 22 years ago
Resolution: --- → DUPLICATE
Updated•21 years ago
|
Status: RESOLVED → VERIFIED
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•