RESOLVED FIXED 235468
[JSC] Relax Date.parse requirement
https://bugs.webkit.org/show_bug.cgi?id=235468
Summary [JSC] Relax Date.parse requirement
Yusuke Suzuki
Reported 2022-01-21 21:28:07 PST
[JSC] Relax Date.parse requirement
Attachments
Patch (2.99 KB, patch)
2022-01-21 21:30 PST, Yusuke Suzuki
no flags
Patch (5.04 KB, patch)
2022-01-21 22:16 PST, Yusuke Suzuki
darin: review+
Yusuke Suzuki
Comment 1 2022-01-21 21:30:32 PST
Yusuke Suzuki
Comment 2 2022-01-21 22:16:33 PST
Darin Adler
Comment 3 2022-01-22 13:49:36 PST
Comment on attachment 449724 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=449724&action=review > Source/WTF/ChangeLog:12 > + While the spec does not require accepting 't' / ' ' separator, ISO 8601 accepts it. > + This is because ECMA262's Date format is *not* ISO 8601 (it is called simplification > + of ISO 8601[1]). > + This patch relaxes this strictness to accept more formats, which can be accepted in > + the other engines too. Is there some interoperability test suite we can add this to, in addition to having it in a WebKit-specific test?
Yusuke Suzuki
Comment 4 2022-01-22 15:48:41 PST
Comment on attachment 449724 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=449724&action=review >> Source/WTF/ChangeLog:12 >> + the other engines too. > > Is there some interoperability test suite we can add this to, in addition to having it in a WebKit-specific test? Unfortunately, there is no test like that. test262 has Date related tests, but it does not include this kind of things since it is not defined in the spec.
Yusuke Suzuki
Comment 5 2022-01-22 16:00:49 PST
Radar WebKit Bug Importer
Comment 6 2022-01-22 16:01:17 PST
Darin Adler
Comment 7 2022-01-22 16:23:44 PST
Since this matters for website compatibility, then we should strive to find a place for a test like this so we can come together with other web browser vendors to ensure interoperability. If Test262 is not the place for it, maybe we can find another?
Yusuke Suzuki
Comment 8 2022-01-22 16:29:56 PST
(In reply to Darin Adler from comment #7) > Since this matters for website compatibility, then we should strive to find > a place for a test like this so we can come together with other web browser > vendors to ensure interoperability. > > If Test262 is not the place for it, maybe we can find another? There is an attempt to specify the behavior in the spec[1]. So, if it is integrated into the spec, we can have a test in test262. But so far, I have no idea where we can have this test since currently the spec says implementation-dependent... [1]: https://github.com/tc39/proposal-uniform-interchange-date-parsing
Darin Adler
Comment 9 2022-01-22 16:56:40 PST
Makes sense that ideally we don’t want a test that doesn’t correspond to a specification. But I’d say that our core goal is the interoperability, so even if a particular specification leaves things undefined that need to be consistent achieve interoperability we’d want some kind of test.
Yusuke Suzuki
Comment 10 2022-01-22 17:44:09 PST
(In reply to Darin Adler from comment #9) > Makes sense that ideally we don’t want a test that doesn’t correspond to a > specification. But I’d say that our core goal is the interoperability, so > even if a particular specification leaves things undefined that need to be > consistent achieve interoperability we’d want some kind of test. Since one of the goal of spec is interoperability, I think the right place is test262 after the proposal gets stage-3. But right now it is not stage-3, so we cannot add tests to test262. So, I think we should wait for the proposal getting mature enough to add tests.
Yusuke Suzuki
Comment 11 2022-01-22 17:45:37 PST
(In reply to Yusuke Suzuki from comment #10) > (In reply to Darin Adler from comment #9) > > Makes sense that ideally we don’t want a test that doesn’t correspond to a > > specification. But I’d say that our core goal is the interoperability, so > > even if a particular specification leaves things undefined that need to be > > consistent achieve interoperability we’d want some kind of test. > > Since one of the goal of spec is interoperability, I think the right place > is test262 after the proposal gets stage-3. > But right now it is not stage-3, so we cannot add tests to test262. > So, I think we should wait for the proposal getting mature enough to add > tests. And until that, we can have these tests in WebKit tree as this patch added them ;)
Yusuke Suzuki
Comment 12 2022-04-06 03:23:40 PDT
*** Bug 238626 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.