Closed
Bug 199293
Opened 22 years ago
Closed 22 years ago
the number returned by Date.parse() and date.valueOf() sometimes contains a colon instead of a zero
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
DUPLICATE
of bug 140852
People
(Reporter: mozilla, Assigned: rogerl)
Details
User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.3a) Gecko/20021212
Build Identifier: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.3a) Gecko/20021212
For example,
function test() {
var x = new Date(1975,0,7);
alert(Date.parse(x));
}
returns 1582847:0000 instead of 158284700000
Reproducible: Sometimes
Steps to Reproduce:
1.The above function will reproduce the problem
2.
3.
Actual Results:
The problem only appears to affect some dates but not others
Expected Results:
Expected an integer representing the number of milleseconds since 1/1/1970
JS console does not report any errors
Comment 1•22 years ago
|
||
Alasdair: thank you for this report. We had that trouble for a while,
but it should be fixed in current builds (i.e. any after 2003-02-17).
It had to do with floating point errors on Windows for large integers.
Reference: bug 140852
"String(819187200000) == '8191871:0000' in xpcshell, browser"
*** This bug has been marked as a duplicate of 140852 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Comment 2•22 years ago
|
||
Verified Duplicate.
Please reopen this bug if current trunk builds (rv:1.4a)
still show the problem; thanks!
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•