-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normative: Fix order of rounding* option reads and resolvedOptions()
This PR are mostly Normative but have some editorial parts 1. Editorial: Add text to explain ComputedRoundingPriority in section "15.4 Properties of Intl.NumberFormat Instances" https://tc39.es/ecma402/#sec-properties-of-intl-numberformat-instances and "16.4 Properties of Intl.PluralRules Instances https://tc39.es/ecma402/#sec-properties-of-intl-pluralrules-instances 2. Editorial: Add ComputedRoundingPriority to Intl.PluralRules https://tc39.es/ecma402/#sec-intl.pluralrules Without this, the spec is not implementable because InitializePluralRules call "SetNumberFormatDigitOptions(pluralRules, options, +0𝔽, 3𝔽, "standard")." and SetNumberFormatDigitOptions assume the intlObj has `[[ComputedRoundingPriority]]` 3. Normative: Move the reading of "roundingPriority" from before reading "roundingIncrement" to after reading "roundingMode" so these three fields are read in alphabetic order. https://tc39.es/ecma402/#sec-setnfdigitoptions 4. Normative: Move the output order of "roundingIncrement" from after output "roundingMode" to before that so these two fields are read in alphabetic order in the resolvedOptions of both Intl.NumberFormat and Intl.PluralRules. https://tc39.es/ecma402/#sec-intl.numberformat.prototype.resolvedoptions https://tc39.es/ecma402/#sec-intl.pluralrules.prototype.resolvedoptions 5. Normative: Move the output of "roundingPriority" from after "trailingZeroDisplay" before that to sync w/ Intl.NumberFormat after PR768. https://tc39.es/ecma402/#sec-intl.pluralrules.prototype.resolvedoptions 6. Normative: Move the output of "pluralCategories" from after "trailingZeroDisplay" to before "roundingIncrement" so these options will be in alphabetic order. https://tc39.es/ecma402/#sec-intl.pluralrules.prototype.resolvedoptions
- Loading branch information
1 parent
0fbf16c
commit 6f0db10
Showing
2 changed files
with
21 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters