[Webkit-unassigned] [Bug 44632] New: Date.parse not ES5 compliant, cannot parse standard Date Time String format

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 25 13:13:56 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=44632

           Summary: Date.parse not ES5 compliant, cannot parse standard
                    Date Time String format
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: natevw at yahoo.com


WebKit's Date.parse method cannot handle datetime strings in ECMAScript 5's RFC 3339/ISO 8601–style date interchange format (formally defined in ECMA-262-5 § 15.9.1.15).

This breaks compliance with ECMA-262-5, because in according to § 15.9.4.2 the following comparison should yield true:

x = new Date();
Date.parse(x.toString()) === Date.parse(x.toISOString())


As of WebKit r65825, the comparison yields false because Date.parse((new Date).toISOString()) returns NaN instead of the correct UTC milliseconds.


Notes:
Date.parse correctly handles the English readable RFC 822–style date formats dumped by Date.prototype.toString(), but these are not suitable for interchange (and standards-wise parsing them only represents an allowable implementation-specific fallback heuristic).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list