-
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: Calendar and TimeZone removals #2925
Conversation
4047d55
to
493ce51
Compare
493ce51
to
74ec1c7
Compare
74ec1c7
to
ffa4bd6
Compare
49b2b3e
to
ec7cdcb
Compare
The spec text uses ToTemporalPartialDurationRecord here, not PrepareTemporalFields. This is relevant because we are going to refactor PrepareTemporalFields as part of #2925.
ToTemporalTimeRecord can be simplified quite a lot and doesn't need to call the more complicated PrepareTemporalFields. This change is unobservable, but it's preparation for refactoring PrepareTemporalFields in #2925.
ec7cdcb
to
c86abf6
Compare
ToTemporalTimeRecord can be simplified quite a lot and doesn't need to call the more complicated PrepareTemporalFields. This change is unobservable, but it's preparation for refactoring PrepareTemporalFields in #2925.
c86abf6
to
2b549d0
Compare
The spec text uses ToTemporalPartialDurationRecord here, not PrepareTemporalFields. This is relevant because we are going to refactor PrepareTemporalFields as part of #2925.
ToTemporalTimeRecord can be simplified quite a lot and doesn't need to call the more complicated PrepareTemporalFields. This change is unobservable, but it's preparation for refactoring PrepareTemporalFields in #2925.
…objs Tweak some tests to provide coverage of new execution paths in the spec, such as calling GetOptionsObject inside ToTemporal___; add a few new tests for things that weren't covered before, such as rounding a PlainDateTime at the edge of the range; and tweak the tests verifying when the properties of the options bag are read, which I made a mistake in tc39#4119. See: tc39/proposal-temporal#2925
2b549d0
to
2fa1b21
Compare
This is ready for review now. There is a small amount of additional and tweaked test coverage, in tc39/test262#4206. |
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.
Thank you!
…objs Tweak some tests to provide coverage of new execution paths in the spec, such as calling GetOptionsObject inside ToTemporal___; add a few new tests for things that weren't covered before, such as rounding a PlainDateTime at the edge of the range; and tweak the tests verifying when the properties of the options bag are read, which I made a mistake in tc39#4119. See: tc39/proposal-temporal#2925
…objs Tweak some tests to provide coverage of new execution paths in the spec, such as calling GetOptionsObject inside ToTemporal___; add a few new tests for things that weren't covered before, such as rounding a PlainDateTime at the edge of the range; and tweak the tests verifying when the properties of the options bag are read, which I made a mistake in #4119. See: tc39/proposal-temporal#2925
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.
Amazing work on this. 🎉 🙏
ef56146
to
aa339b8
Compare
Hopefully this will fix uploading code coverage reports, at least temporarily. (This uploader is deprecated and they want you to migrate to the GitHub Action.)
Amazing work on this, @ptomato ! 🙏 |
…25505) Mainly I removed `Temporal.Calendar` and `Temporal.TimeZone` and replaced them to APIs that handle calendar and timezone as strings. tc39/proposal-temporal#2925 Related #24836
Similarly to the previous commit, we must avoid calling GetUTCEpochNanoseconds with dates that are too large because it is ill-defined in ECMA-262 what is supposed to happen. (See tc39/ecma262#1087). Previously to PR #2925, that could not happen because GetPossibleInstantsFor took a PlainDateTime object, but now it takes an ISO Date-Time Record. Note that this is editorial, because IsValidEpochNanoseconds would throw anyway in this case even if GetUTCEpochNanoseconds was fully defined for large inputs.
Similarly to the previous commit, we must avoid calling GetUTCEpochNanoseconds with dates that are too large because it is ill-defined in ECMA-262 what is supposed to happen. (See tc39/ecma262#1087). Previously to PR #2925, that could not happen because GetPossibleInstantsFor took a PlainDateTime object, but now it takes an ISO Date-Time Record. Note that this is editorial, because IsValidEpochNanoseconds would throw anyway in this case even if GetUTCEpochNanoseconds was fully defined for large inputs.
Similarly to the previous commit, we must avoid calling GetUTCEpochNanoseconds with dates that are too large because it is ill-defined in ECMA-262 what is supposed to happen. (See tc39/ecma262#1087). Previously to PR #2925, that could not happen because we used a PlainDateTime object in InterpretISODateTimeOffset, but now we use an ISO Date-Time Record. Note that this is editorial, because IsValidEpochNanoseconds would throw anyway in this case even if GetUTCEpochNanoseconds was fully defined for large inputs.
Similarly to the previous commit, we must avoid calling GetUTCEpochNanoseconds with dates that are too large because it is ill-defined in ECMA-262 what is supposed to happen. (See tc39/ecma262#1087). Previously to PR #2925, that could not happen because GetPossibleInstantsFor took a PlainDateTime object, but now it takes an ISO Date-Time Record. Note that this is editorial, because IsValidEpochNanoseconds would throw anyway in this case even if GetUTCEpochNanoseconds was fully defined for large inputs.
Similarly to the previous commit, we must avoid calling GetUTCEpochNanoseconds with dates that are too large because it is ill-defined in ECMA-262 what is supposed to happen. (See tc39/ecma262#1087). Previously to PR #2925, that could not happen because we used a PlainDateTime object in InterpretISODateTimeOffset, but now we use an ISO Date-Time Record. Note that this is editorial, because IsValidEpochNanoseconds would throw anyway in this case even if GetUTCEpochNanoseconds was fully defined for large inputs.
This is a follow-up request from Anba, to the normative change in #2925. It moves syntactic validation of month codes and offset strings into PrepareCalendarFields. This allows implementations to store month codes and offset strings as integers in their equivalents of Calendar Fields Records, instead of allocated strings. Closes: #2962
This is a follow-up request from Anba, to the normative change in #2925. It moves syntactic validation of month codes and offset strings into PrepareCalendarFields. This allows implementations to store month codes and offset strings as integers in their equivalents of Calendar Fields Records, instead of allocated strings. Closes: #2962
This is a follow-up request from Anba, to the normative change in #2925. It moves syntactic validation of month codes and offset strings into PrepareCalendarFields. This allows implementations to store month codes and offset strings as integers in their equivalents of Calendar Fields Records, instead of allocated strings. Closes: #2962
This is a follow-up request from Anba, to the normative change in #2925. It moves syntactic validation of month codes and offset strings into PrepareCalendarFields. This allows implementations to store month codes and offset strings as integers in their equivalents of Calendar Fields Records, instead of allocated strings. Closes: #2962
This is a follow-up request from Anba, to the normative change in #2925. It moves syntactic validation of month codes and offset strings into PrepareCalendarFields. This allows implementations to store month codes and offset strings as integers in their equivalents of Calendar Fields Records, instead of allocated strings. Closes: #2962
This is a follow-up request from Anba, to the normative change in #2925. It moves syntactic validation of month codes and offset strings into PrepareCalendarFields. This allows implementations to store month codes and offset strings as integers in their equivalents of Calendar Fields Records, instead of allocated strings. Closes: #2962
This is the remaining followup from #2895 and #2914, implementing the conclusions from the June 2024 TC39 meeting.
It is stacked on top of the editorial PR #2922.Some editorial simplifications still to be done on this PR.