Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporal: Tests for normative changes around date-only strings #3699

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

ptomato
Copy link
Contributor

@ptomato ptomato commented Oct 24, 2022

As per the discussion in
tc39/proposal-temporal#2379 (comment) and the PR tc39/proposal-temporal#2428, which is to be presented for consensus to TC39 in the upcoming plenary meeting, UTC offsets and the Z designator should be disallowed after any date-only strings (YYYY-MM-DD, YYYY-MM, and MM-DD). They should only be allowed to follow a time component. Z remains disallowed in any string being parsed into a Plain type.

Annotations become allowed after any ISO string, even YYYY-MM and MM-DD where they were previously disallowed.

@ptomato ptomato requested review from a team as code owners October 24, 2022 20:32
@ptomato ptomato added the awaiting consensus This needs committee consensus before it can be eligible to be merged. label Oct 24, 2022
@ptomato ptomato marked this pull request as draft October 24, 2022 20:34
Aditi-1400
Aditi-1400 previously approved these changes Oct 27, 2022
@ptomato ptomato marked this pull request as ready for review November 29, 2022 19:20
@ptomato ptomato added has pending pr has consensus This has committee consensus and removed awaiting consensus This needs committee consensus before it can be eligible to be merged. labels Nov 29, 2022
@ptomato
Copy link
Contributor Author

ptomato commented Nov 29, 2022

The corresponding normative change achieved consensus in the TC39 plenary meeting today.

As per the discussion in
tc39/proposal-temporal#2379 (comment)
and the PR tc39/proposal-temporal#2398, which is
to be presented for consensus to TC39 in the upcoming plenary meeting, UTC
offsets and the Z designator should be disallowed after any date-only
strings (YYYY-MM-DD, YYYY-MM, and MM-DD). They should only be allowed to
follow a time component. Z remains disallowed in any string being parsed
into a Plain type.

Annotations become allowed after any ISO string, even YYYY-MM and MM-DD
where they were previously disallowed.
@ptomato ptomato merged commit 6e4f412 into tc39:main Nov 30, 2022
@ptomato ptomato deleted the temporal-2398 branch November 30, 2022 18:11
sosukesuzuki added a commit to sosukesuzuki/WebKit that referenced this pull request Aug 15, 2024
https://bugs.webkit.org/show_bug.cgi?id=278139

Reviewed by NOBODY (OOPS!).

In the latest Temporal spec, a TimeZone after a Date without a Time should be rejected[1][2].

However, the current JSC allows such ISO 8601 strings.

This PR changes to throw a RangeError when a TimeZone appears without a Time.

[1]: tc39/proposal-temporal#2428
[2]: tc39/test262#3699

* JSTests/test262/expectations.yaml:
* Source/JavaScriptCore/runtime/ISO8601.cpp:
(JSC::ISO8601::parseDateTime):
sosukesuzuki added a commit to sosukesuzuki/WebKit that referenced this pull request Aug 15, 2024
https://bugs.webkit.org/show_bug.cgi?id=278139

Reviewed by NOBODY (OOPS!).

In the latest Temporal spec, a TimeZone after a Date without a Time should be rejected[1][2].

However, the current JSC allows such ISO 8601 strings.

This PR changes to throw a RangeError when a TimeZone appears without a Time.

[1]: tc39/proposal-temporal#2428
[2]: tc39/test262#3699

* JSTests/test262/expectations.yaml:
* Source/JavaScriptCore/runtime/ISO8601.cpp:
(JSC::ISO8601::parseDateTime):
webkit-commit-queue pushed a commit to sosukesuzuki/WebKit that referenced this pull request Aug 15, 2024
https://bugs.webkit.org/show_bug.cgi?id=278139

Reviewed by Ross Kirsling.

In the latest Temporal spec, a TimeZone after a Date without a Time should be rejected[1][2].

However, the current JSC allows such ISO 8601 strings.

This PR changes to throw a RangeError when a TimeZone appears without a Time.

[1]: tc39/proposal-temporal#2428
[2]: tc39/test262#3699

* JSTests/test262/expectations.yaml:
* Source/JavaScriptCore/runtime/ISO8601.cpp:
(JSC::ISO8601::parseDateTime):

Canonical link: https://commits.webkit.org/282315@main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has consensus This has committee consensus has pending pr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants