Status: New
Owner: ----

New issue 638 by ddrcode: Date.prototype.toISOString returns string of 6 NaNs for invalid date
http://code.google.com/p/v8/issues/detail?id=638

Date.prototype.toISOString and Date.prototype.toJSON methods don't work
properly with invalid dates. Test case:

var d = new Date(Infinity); // or new Date(NaN)
var str = d.toISOString(); // or d.toJSON()

The result is "NaN-NaN-NaNTNaN:NaN:NaNZ". Safari and Firefox return "Invalid
Date" string is such case. According to ECMA5 specification RangeError should
be thrown.

Test environment: Google Chrome 4.0.249.89 (38071)

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to