Skip to content

Normative: Don't output "fractionalDigits" when the value is undefined#167

Merged
ben-allen merged 1 commit intotc39:mainfrom
anba:resolved-frac
Jan 6, 2024
Merged

Normative: Don't output "fractionalDigits" when the value is undefined#167
ben-allen merged 1 commit intotc39:mainfrom
anba:resolved-frac

Conversation

@anba
Copy link
Copy Markdown
Contributor

@anba anba commented Aug 22, 2023

For consistency with other Intl objects, don't output "fractionalDigits" when its value is undefined.

Applies on top #166.

@anba
Copy link
Copy Markdown
Contributor Author

anba commented Aug 22, 2023

This was previously mentioned in #150 (comment).

@ben-allen
Copy link
Copy Markdown
Collaborator

ben-allen commented Aug 23, 2023

There's recent consensus for treating undefined fractionalDigits as meaning "as many fractional digits as needed"

#144 (comment)

@anba
Copy link
Copy Markdown
Contributor Author

anba commented Aug 23, 2023

There's recent consensus for treating undefined fractionalDigits as meaning "as many fractional digits as needed"

This isn't changed with this PR. Only the resolvedOptions output is changed from fractionalDigits: undefined to not emitting a fractionalDigits property at all.

@FrankYFTang
Copy link
Copy Markdown
Collaborator

This PR contains way too many editorial changes. Could we split that?

@anba
Copy link
Copy Markdown
Contributor Author

anba commented Aug 30, 2023

This PR contains way too many editorial changes. Could we split that?

As mentioned above, this PR applies on top of #166. When #166 gets merged, this PR will consist of only a single commit.

Copy link
Copy Markdown
Member

@ryzokuken ryzokuken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normative change LGTM

@sffc
Copy link
Copy Markdown
Collaborator

sffc commented Sep 7, 2023

@ryzokuken ryzokuken added consensus We reached a consensus in a discussion meeting, through email or the issue discussion needs-tg1 and removed Reply Needed labels Sep 8, 2023
Copy link
Copy Markdown
Collaborator

@FrankYFTang FrankYFTang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

FrankYFTang added a commit to FrankYFTang/test262 that referenced this pull request Sep 9, 2023
Test the order of resolvedOptions in default setting
Also add test to check the reading order of options based on the
property returned in the default setting resolvedOptions.

tc39/proposal-intl-duration-format#167
tc39/proposal-intl-duration-format#172
https://tc39.es/proposal-intl-duration-format/#sec-Intl.DurationFormat.prototype.resolvedOptions

These two PRs are presenting to TC39 2023-09 meeting
FrankYFTang added a commit to FrankYFTang/test262 that referenced this pull request Sep 9, 2023
Test the order of resolvedOptions in default setting
Also add test to check the reading order of options based on the
property returned in the default setting resolvedOptions.

tc39/proposal-intl-duration-format#167
tc39/proposal-intl-duration-format#172
https://tc39.es/proposal-intl-duration-format/#sec-Intl.DurationFormat.prototype.resolvedOptions

These two PRs are presenting to TC39 2023-09 meeting
@FrankYFTang
Copy link
Copy Markdown
Collaborator

test PR tc39/test262#3912

@FrankYFTang
Copy link
Copy Markdown
Collaborator

@ben-allen @sffc @ryzokuken This is discussed and agreed in TG2 in 2023-09-07 but we need someone to bring this up to TG1 in Nov 2023 before this can be merged.

For consistency with other Intl objects, don't output "fractionalDigits"
when its value is `undefined`.
@anba
Copy link
Copy Markdown
Contributor Author

anba commented Oct 18, 2023

Rebased now that #166 is merged.

@ryzokuken
Copy link
Copy Markdown
Member

2023-11-28: This PR achieved TC39-TG1 consensus.

@ben-allen ben-allen merged commit 6806a76 into tc39:main Jan 6, 2024
FrankYFTang added a commit to FrankYFTang/test262 that referenced this pull request Apr 10, 2024
Test the order of resolvedOptions in default setting
Also add test to check the reading order of options based on the
property returned in the default setting resolvedOptions.

tc39/proposal-intl-duration-format#167
tc39/proposal-intl-duration-format#172
https://tc39.es/proposal-intl-duration-format/#sec-Intl.DurationFormat.prototype.resolvedOptions

These two PRs are presenting to TC39 2023-09 meeting
FrankYFTang added a commit to FrankYFTang/test262 that referenced this pull request Apr 10, 2024
Test the order of resolvedOptions in default setting
Also add test to check the reading order of options based on the
property returned in the default setting resolvedOptions.

tc39/proposal-intl-duration-format#167
tc39/proposal-intl-duration-format#172
https://tc39.es/proposal-intl-duration-format/#sec-Intl.DurationFormat.prototype.resolvedOptions

These two PRs are presenting to TC39 2023-09 meeting

Swap actual/expected order

Update test/intl402/DurationFormat/constructor-option-read-order.js

Co-authored-by: André Bargull <andre.bargull@gmail.com>

Fix per anba suggestion
ptomato pushed a commit to FrankYFTang/test262 that referenced this pull request Jul 24, 2024
Test the order of resolvedOptions in default setting
Also add test to check the reading order of options based on the
property returned in the default setting resolvedOptions.

tc39/proposal-intl-duration-format#167
tc39/proposal-intl-duration-format#172
https://tc39.es/proposal-intl-duration-format/#sec-Intl.DurationFormat.prototype.resolvedOptions

These two PRs are presenting to TC39 2023-09 meeting

Swap actual/expected order

Update test/intl402/DurationFormat/constructor-option-read-order.js

Co-authored-by: André Bargull <andre.bargull@gmail.com>

Fix per anba suggestion
ptomato pushed a commit to tc39/test262 that referenced this pull request Jul 24, 2024
Test the order of resolvedOptions in default setting
Also add test to check the reading order of options based on the
property returned in the default setting resolvedOptions.

tc39/proposal-intl-duration-format#167
tc39/proposal-intl-duration-format#172
https://tc39.es/proposal-intl-duration-format/#sec-Intl.DurationFormat.prototype.resolvedOptions

These two PRs are presenting to TC39 2023-09 meeting

Swap actual/expected order

Update test/intl402/DurationFormat/constructor-option-read-order.js

Co-authored-by: André Bargull <andre.bargull@gmail.com>

Fix per anba suggestion
webkit-commit-queue pushed a commit to sosukesuzuki/WebKit that referenced this pull request Sep 19, 2024
https://bugs.webkit.org/show_bug.cgi?id=279940

Reviewed by Yusuke Suzuki.

This patch makes the following changes to update `Intl.DurationFormat.prototype.resolvedOptions` to
the latest spec:

  - Does not put `fractionalDigits` when it is `undefined`[1]
  - Put `numberingSystem` before `style`[2]

[1]: tc39/proposal-intl-duration-format#167
[2]: tc39/proposal-intl-duration-format#172

* Source/JavaScriptCore/runtime/IntlDurationFormat.cpp:
(JSC::IntlDurationFormat::resolvedOptions const):
* JSTests/test262/expectations.yaml:
* JSTests/stress/intl-durationformat.js:
(test):

Canonical link: https://commits.webkit.org/283901@main
@danc6886-hue danc6886-hue moved this to Previously Discussed in [COPY] ECMA-402 Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consensus We reached a consensus in a discussion meeting, through email or the issue discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants