Closed Bug 332349 Opened 18 years ago Closed 18 years ago

Function GetYear (JavaScript)

Categories

(Toolkit Graveyard :: Error Console, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 22964

People

(Reporter: fr_ribeiro, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

Year View = 106  (correct is 2006)


Reproducible: Always

Steps to Reproduce:
Execute this file:

<html>
<head>
<title>Problem in JAVA - GetDate</title>
<body>
<script language="JavaScript"><!--
        xNow = new Date()
        xDay = xNow.getDate()
        xMonth = xNow.getMonth()
        xYear = xNow.getYear()

        document.write ("<font color='black' size='2' face='Arial'><b>" + xDay + " / " + xMonth + " / " + xYear + " </font></b>")

--></script> 
</body>
</head>
</html>
Actual Results:  
31 / 2 / 106

Expected Results:  
31 / 2 / 2006
Attached file Example
File for test
*** This bug has been marked as a duplicate of 22964 ***

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

Attachment

General

Creator:
Created:
Updated:
Size: