ECMA-262 defined a Date.parse method to convert a string to a number
In the current implementation (v1.3.9), the result like
> Date.parse("1970.1.0")
NaN
> Date.parse("1970.1.1")
-28800000
> Date.parse("1970.1.2")
57600000
On the other hand, the result of Date.parse("1970.1.1") is NaN in IE 8
and firefox 3.5.2.
I'm not sure whether it is a design issue or bug?
15.9.4.2 Date.parse (string)
The parse function applies the ToString operator to its argument and
interprets the resulting string
as a date; it returns a number, the UTC time value corresponding to
the date. The string may be
interpreted as a local time, a UTC time, or a time in some other time
zone, depending on the contents
of the string.
--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---