[Webkit-unassigned] [Bug 238626] `Date` parse error with `ISO 8601` date+time input, white-space delimited time (`YYYY-MM-DD HH:mm:ss`)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 6 01:34:02 PDT 2022


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

--- Comment #2 from Yusuke Suzuki <ysuzuki at apple.com> ---
(In reply to strarsis from comment #0)
> On `iOS`/`iPad` Safari browser engine the JavaScript `Date` fails to parse
> `ISO 8601` date+time inputs where the date and time are delimited by a
> white-space instead of the `T` character (e.g. `2022-03-22 17:51:57`): 
> The `Date` constructor fails with `Invalid date format`.
> 
> The usage of a white-space as delimiter between date and time isn't
> specified by ISO 8601, but is allowed by the RFC that is mostly used on the
> web.

Note that ECMAScript spec is "date-times based upon a simplification of the ISO 8601"[1], not a ISO 8601 or RFC. So using space here is implementation-dependent behavior (spec only accepts "T" case.)

But it can be a good extension.

[1]: https://tc39.es/ecma262/#sec-date-time-string-format

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220406/66bf0237/attachment-0001.htm>


More information about the webkit-unassigned mailing list