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

Normative: add Intl.DurationFormat #943

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ben-allen
Copy link
Contributor

@ben-allen
Copy link
Contributor Author

@FrankYFTang FrankYFTang reopened this Dec 18, 2024
@FrankYFTang
Copy link
Contributor

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>
Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Contributor

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.

ptomato added a commit to tc39/proposal-temporal that referenced this pull request Feb 13, 2025
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.
ptomato added a commit to tc39/proposal-temporal that referenced this pull request Feb 13, 2025
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.
ptomato added a commit to tc39/proposal-temporal that referenced this pull request Feb 14, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants