-
Notifications
You must be signed in to change notification settings - Fork 106
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: add Intl.DurationFormat #943
base: main
Are you sure you want to change the base?
Conversation
sorry. click accidentially. reopen. TC39 reach Stage 4 concensus on 2024-12-02 . We should merge this |
1. If abs(_normalizedSeconds_) ≥ 2<sup>53</sup>, return *false*. | ||
1. Return *true*. | ||
</emu-alg> | ||
<emu-note>The abstract operations ToIntegerIfIntegral, DurationSign, and IsValidDuration take the same parameters as the abstract operations of the same name in the Temporal proposal's specification, aside from the use of a Duration Record instead of a Temporal.Duration instance. They will be removed in favor of the equivalent Temporal abstract operations if the Temporal proposal becomes part of ECMAScript before this proposal does.</emu-note> |
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.
I'd delete this note, it's irrelevant once this PR is merged.
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.
hmm, I was under the impression that this note would need to be changed and that the idea would be that once Temporal lands the AOs would be removed from 402 and we'd use AOs from 262 instead.
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.
Yes, that's still the idea, but I don't think the note is relevant. Temporal moves several more AOs from 402 into 262, not just these.
DurationSign no longer needs to be defined by Temporal, as it's now part of ECMA-402. However, when Temporal becomes part of ECMA-262, we do need to move DurationSign into ECMA-262. Put it in a <del> block in intl.html. We can keep the new definition in its current place in the spec while adjusting its ID. Once Temporal.Duration objects are introduced, there is no longer any need for Duration Records. So, make the ECMA-402 DurationSign accept a Temporal.Duration object (as it already did in Temporal), delete the ToDurationRecord operation and the Duration Record definition, and change several other operations from ECMA-402 to use Temporal.Duration objects instead of Duration Records. Temporarily, since these operations aren't yet in ecma402-biblio pending tc39/ecma402#943, add a JSON bibliography file so the references aren't dangling.
DurationSign no longer needs to be defined by Temporal, as it's now part of ECMA-402. However, when Temporal becomes part of ECMA-262, we do need to move DurationSign into ECMA-262. Put it in a <del> block in intl.html. We can keep the new definition in its current place in the spec while adjusting its ID. Once Temporal.Duration objects are introduced, there is no longer any need for Duration Records. So, make the ECMA-402 DurationSign accept a Temporal.Duration object (as it already did in Temporal), delete the ToDurationRecord operation and the Duration Record definition, and change several other operations from ECMA-402 to use Temporal.Duration objects instead of Duration Records. Temporarily, since these operations aren't yet in ecma402-biblio pending tc39/ecma402#943, add a JSON bibliography file so the references aren't dangling.
DurationSign no longer needs to be defined by Temporal, as it's now part of ECMA-402. However, when Temporal becomes part of ECMA-262, we do need to move DurationSign into ECMA-262. Put it in a <del> block in intl.html. We can keep the new definition in its current place in the spec while adjusting its ID. Once Temporal.Duration objects are introduced, there is no longer any need for Duration Records. So, make the ECMA-402 DurationSign accept a Temporal.Duration object (as it already did in Temporal), delete the ToDurationRecord operation and the Duration Record definition, and change several other operations from ECMA-402 to use Temporal.Duration objects instead of Duration Records. Temporarily, since these operations aren't yet in ecma402-biblio pending tc39/ecma402#943, add a JSON bibliography file so the references aren't dangling.
https://github.com/tc39/proposal-intl-duration-format