Closed
Bug 290230
Opened 20 years ago
Closed 20 years ago
if i use the javascript function getYear its returns the number of years passed from 1900 to now
Categories
(Firefox :: General, defect)
Tracking
()
People
(Reporter: k4z4d0r, Assigned: bugzilla)
References
()
Details
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.
Comment 1•20 years ago
|
||
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
Closed: 20 years ago
Resolution: --- → DUPLICATE
Updated•20 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•