Bug 70008
Summary: | Date.toLocaleString should probably report invalid dates as such. | ||
---|---|---|---|
Product: | WebKit | Reporter: | Gavin Barraclough <barraclough> |
Component: | JavaScriptCore | Assignee: | Andy VanWagoner <andy> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | andy, code.vineet |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | javascript:alert((new Date("")).toLocaleString() == "Invalid Date") |
Gavin Barraclough
The provided URL reports true in FireFox, we should probably match this behavior since it makes more sense (though this is spec'ed to be implementation dependent, so our current behavior isn't technically wrong).
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Vineet Chaudhary (vineetc)
I tested this on chrome-linux and webkit-gtk. It returns Invalid date ie. result as true. Am I missing something here.
Gavin Barraclough
This is a JSC bug; chrome uses v8.
Andy VanWagoner
This appears to be working correctly now. Please reopen with additional details if there is still a case where an invalid date object does not return "Invalid Date" from toLocaleString.