-
Notifications
You must be signed in to change notification settings - Fork 156
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: Avoid ToString(calendar)
when the calendar-id is unused
#2269
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2269 +/- ##
=======================================
Coverage 90.95% 90.95%
=======================================
Files 19 19
Lines 10465 10466 +1
Branches 1678 1680 +2
=======================================
+ Hits 9518 9519 +1
Misses 939 939
Partials 8 8
Flags with carried forward coverage won't be shown. Click here to find out more.
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.
Makes sense, for consistency. I will mark this as draft until presented to TC39.
…lendar) This implements the normative change in tc39/proposal-temporal#2269 which reached consensus at the July 2022 TC39 meeting. There was already a test for PlainDate for this topic, which needs to be adjusted to accommodate the normative change. Tests for PlainDateTime and ZonedDateTime did not yet exist, so add new ones based on the PlainDate test.
70088a4
to
1a0e382
Compare
This change achieved consensus in the July 2022 TC39 meeting. I've added another commit to bring the reference code in sync with the spec change. Since that will break tests, we should wait until tc39/test262#3623 is merged and update the test262 submodule commit as part of merging this. |
1a0e382
to
a5a8186
Compare
…lendar) This implements the normative change in tc39/proposal-temporal#2269 which reached consensus at the July 2022 TC39 meeting. There was already a test for PlainDate for this topic, which needs to be adjusted to accommodate the normative change. Tests for PlainDateTime and ZonedDateTime did not yet exist, so add new ones based on the PlainDate test.
tc39/test262#3623 is merged |
`TemporalZonedDateTimeToString` doesn't call `ToString(timeZone)` when `showTimeZone == "never"`. Do the same for `ToString(calendar)`. `TemporalYearMonthToString` and `TemporalMonthDayToString` weren't changed because both have to special-case non-ISO-8601 calendars.
The repeated normative change in the previous commit goes into its own abstract operation, MaybeFormatCalendarAnnotation. While we are at it, updates FormatCalendarAnnotation to use a structured header, and updates the link in the editor's note.
Implements the normative change in the previous commit in the polyfill, for the purpose of verifying test262 tests.
a5a8186
to
2ae54ff
Compare
TemporalZonedDateTimeToString
doesn't callToString(timeZone)
whenshowTimeZone == "never"
. Do the same forToString(calendar)
.TemporalYearMonthToString
andTemporalMonthDayToString
weren'tchanged because both have to special-case non-ISO-8601 calendars.