Bug 70008 - Date.toLocaleString should probably report invalid dates as such.
Summary: Date.toLocaleString should probably report invalid dates as such.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andy VanWagoner
URL: javascript:alert((new Date("")).toLoc...
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-13 01:48 PDT by Gavin Barraclough
Modified: 2018-12-24 14:53 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2011-10-13 01:48:19 PDT
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).
Comment 1 Vineet Chaudhary (vineetc) 2011-10-13 02:00:08 PDT
I tested this on chrome-linux and webkit-gtk. It returns Invalid date ie. result as true. Am I missing something here.
Comment 2 Gavin Barraclough 2011-10-13 12:22:44 PDT
This is a JSC bug; chrome uses v8.
Comment 3 Andy VanWagoner 2018-12-24 14:53:21 PST
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.