if i use the javascript function getYear its returns the number of years passed from 1900 to now

VERIFIED DUPLICATE of bug 22964

Status

()

Firefox
General
VERIFIED DUPLICATE of bug 22964
13 years ago
13 years ago

People

(Reporter: Santy Medina, Assigned: Blake Ross)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7.6) Gecko/20050321 Firefox/1.0.2

if you have a web page with some code like following:

<html>
<body>
The current year is <script language="javascript">var fecha=new Date(); 
document.write (fecha.getYear());</script>.
</body>
</html>

and you try to browse it in firefox you will get the following message 
(execute in the current year, 2005, for example): "The current year is 105."

If you try to browse it in another browsers you will get the other following 
message (executed in the same conditions): "The current year is 2005."

This problem makes that webpages that use local execution of script to show 
user date or time, dont work with the same code in different browsers.

Reproducible: Always

Steps to Reproduce:
1.open firefox
2.write at url: javascript:var k=new Date();alert(k.getYear());
3.look at the alert message and do it the step 2 in another browser (MsIE, 
etc).

Actual Results:  
it show me an alert message with the number 105

Expected Results:  
it must be 2005 for the current year as the rest of browsers do.
Please search before you file a bug. An easy search with "getyear" as summary
and you will find bug 22964

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