Skip to content

Commit

Permalink
Normative: handle awkward rounding behavior
Browse files Browse the repository at this point in the history
Handle awkward rounding behavior when dealing with currencies and the
value of "maximumFractionDigits" is less than 2.

Fixes: #239
  • Loading branch information
ryzokuken committed Jul 6, 2020
1 parent 28dbdf5 commit ba98455
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/numberformat.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ <h1>SetNumberFormatDigitOptions ( _intlObj_, _options_, _mnfdDefault_, _mxfdDefa
1. Set _intlObj_.[[MaximumSignificantDigits]] to _mxsd_.
1. Else if _mnfd_ is not *undefined* or _mxfd_ is not *undefined*, then
1. Set _intlObj_.[[RoundingType]] to ~fractionDigits~.
1. If _mxfd_ is not *undefined*, then
1. Set _mnfdDefault_ to min( _mxfd_, _mnfdDefault_ ).
1. Let _mnfd_ be ? DefaultNumberOption(_mnfd_, 0, 20, _mnfdDefault_).
1. Let _mxfdActualDefault_ be max( _mnfd_, _mxfdDefault_ ).
1. Let _mxfd_ be ? DefaultNumberOption(_mxfd_, _mnfd_, 20, _mxfdActualDefault_).
Expand Down

0 comments on commit ba98455

Please sign in to comment.