-
Notifications
You must be signed in to change notification settings - Fork 158
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
Normative: Fix inconsistency in order of observable operations in ...FromFields() for non-ISO calendars #2377
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2377 +/- ##
=======================================
Coverage 95.01% 95.01%
=======================================
Files 20 20
Lines 10803 10803
Branches 1925 1925
=======================================
Hits 10264 10264
Misses 503 503
Partials 36 36
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the polyfill should also be updated.
60fc723
to
95bfd89
Compare
I'll mark this as a draft in anticipation of presenting it at the next TC39 meeting. |
95bfd89
to
875c5bb
Compare
Triggered by the discussion in tc39/proposal-temporal#2377 (comment) Arguments should consistently be processed in order.
This implements the normative change in tc39/proposal-temporal#2377 which reached consensus at the September 2022 TC39 meeting. It changes the order in which observable operations are performed on the values passed to the ___fromFields methods of Calendar.
This reached consensus at the September 2022 TC39 meeting. Tests are in tc39/test262#3666 |
This implements the normative change in tc39/proposal-temporal#2377 which reached consensus at the September 2022 TC39 meeting. It changes the order in which observable operations are performed on the values passed to the ___fromFields methods of Calendar.
875c5bb
to
bf1b916
Compare
Previously, the monthDayFromFields() method of non-ISO calendars behaved differently from dateFromFields() and yearMonthFromFields(), as well as monthDayFromFields() of the ISO calendar. The latter checked the overflow option before accessing the fields, and the former checked the overflow option afterwards. This normative change fixes this inconsistency. The general principle is that arguments to a function should be validated in order, so we go with accessing the fields before checking the overflow option. Requires an update to the reference code, which previously consistently checked the overflow option first.
bf1b916
to
6d66459
Compare
Sync to the spec/calendar.html changes in tc39/proposal-temporal#2377 to change the order of calling ToTemporalOverflow. This cl only cover the ISO8601 part, the the intl part of the PR is not yet implemented and will be handle when e implemenet them. Spec text: https://tc39.es/proposal-temporal/#sec-temporal-isodatefromfields https://tc39.es/proposal-temporal/#sec-temporal-isoyearmonthfromfields https://tc39.es/proposal-temporal/#sec-temporal-isomonthdayfromfields Bug: v8:11544 Change-Id: Ia4386d460dc45b0b377a483c6f4793da4cbd7c20 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3903223 Commit-Queue: Frank Tang <[email protected]> Reviewed-by: Adam Klein <[email protected]> Cr-Commit-Position: refs/heads/main@{#83410}
This implements the normative change in tc39/proposal-temporal#2377 which reached consensus at the September 2022 TC39 meeting. It changes the order in which observable operations are performed on the values passed to the ___fromFields methods of Calendar.
This implements the normative change in tc39/proposal-temporal#2377 which reached consensus at the September 2022 TC39 meeting. It changes the order in which observable operations are performed on the values passed to the ___fromFields methods of Calendar.
Triggered by the discussion in tc39/proposal-temporal#2377 (comment) Arguments should consistently be processed in order.
Triggered by the discussion in tc39/proposal-temporal#2377 (comment) Arguments should consistently be processed in order.
Triggered by the discussion in tc39/proposal-temporal#2377 (comment) Arguments should consistently be processed in order.
Triggered by the discussion in tc39/proposal-temporal#2377 (comment) Arguments should consistently be processed in order.
Previously, the monthDayFromFields() method of non-ISO calendars behaved
differently from dateFromFields() and yearMonthFromFields(), checking the
overflow option after accessing the fields whereas the other two checked
the overflow option first.
This normative change fixes this inconsistency.
Split out from #2199 which does not need to be normative. Note this will need a rebase when #2199 is merged.