Commit Graph

5 Commits

Author SHA1 Message Date
Timothy Flynn f5e2214b30 Swap call order of NumberFormat's notation and roundingIncrement options
The order in which these options are read was changed in commit:
29acfc6c3f
2023-02-07 16:14:13 -08:00
Timothy Flynn e6c6460a5b Update Intl.NumberFormat test with recent reorder of option evaluation
The order of evaluation for "notation" and "roundingIncrement" changed
in https://github.com/tc39/proposal-intl-numberformat-v3/commit/a260aa3.
2022-12-12 12:15:53 +01:00
Frank Tang 576c0c0c7f Make minimumFractionDigits = maximumFractionDigits
Make minimumFractionDigits equal to maximumFractionDigits while
roundingIncrement != 1 to sync with latest spec change in
https://github.com/tc39/proposal-intl-numberformat-v3/pull/85
which landed to spec text in Feb 22, 2022
2022-04-25 11:35:24 -04:00
Frank Yung-Fong Tang 0fe508c5f0 change notation to "standard"
I do not believe this setup is correct if we use notation: "compact". 

in https://tc39.es/proposal-intl-numberformat-v3/out/numberformat/diff.html#sec-setnfdigitoptions
notation is "compact"
mnsd is undefined
mxsd is undefined
mnfd is undefined
mxfd is undefined
hasSd is false
hasFd is false
needSd is false
needFd is false
so step 23 else block will be run
Set intlObj.[[RoundingType]] to morePrecision.
then in step 23 of https://tc39.es/proposal-intl-numberformat-v3/out/numberformat/diff.html#sec-initializenumberformat
```
If roundingIncrement is not 1 and numberFormat.[[RoundingType]] is not fractionDigits, throw a RangeError exception.
```
2022-01-07 13:17:50 -05:00
Mike Pennisi d071b37f09 Add tests for "Intl NumberFormat v3" proposal
This patch is intended to cover only one aspect of the proposal for
ECMA402: the "new rounding/precision options" feature.
2022-01-04 09:35:13 -05:00