Skip to content

Number: Fix fraction digit options for patterns with no fraction digits#757

Merged
rxaviers merged 1 commit into
globalizejs:masterfrom
patch:JPY-fraction-digits
Dec 1, 2017
Merged

Number: Fix fraction digit options for patterns with no fraction digits#757
rxaviers merged 1 commit into
globalizejs:masterfrom
patch:JPY-fraction-digits

Conversation

@patch
Copy link
Copy Markdown
Contributor

@patch patch commented Jul 9, 2017

This fixes a bug when setting the minimumFractionDigits or maximumFractionDigits options for number patterns that contain no fraction digits, such as for JPY and other currencies without fraction digits, which currently results in the error E_PAR_OUT_OF_RANGE. The primary use case is for products that don't use fraction digits in their prices for any currency (e.g. $99, £59, 99 €, ¥12,000) and consistently set maximumFractionDigits: 0.

Currencies affected: ADP, AFN, ALL, AMD, BIF, BYR, CLP, COP, DJF, ESP, GNF, GYD, IDR, IQD, IRR, ISK, ITL, JPY, KMF, KPW, KRW, LAK, LBP, LUF, MGA, MGF, MMK, MNT, MRO, MUR, PKR, PYG, RSD, RWF, SLL, SOS, STD, SYP, TMM, TRL, TZS, UGX, UZS, UYI, VND, VUV, XAF, XOF, XPF, YER, ZMK, ZWD

Fixes #472
Fixes #565

This fixes a bug when setting the `minimumFractionDigits` or
`maximumFractionDigits` options for number patterns that contain no fraction
digits, such as for JPY and other currencies without fraction digits, which
currently results in the error E_PAR_OUT_OF_RANGE. The primary use case is for
products that don't use fraction digits in their prices for any currency (e.g.
$99, £59, 99 €, ¥12,000) and consistently set `maximumFractionDigits: 0`.

Currencies affected: ADP, AFN, ALL, AMD, BIF, BYR, CLP, COP, DJF, ESP, GNF, GYD,
IDR, IQD, IRR, ISK, ITL, JPY, KMF, KPW, KRW, LAK, LBP, LUF, MGA, MGF, MMK, MNT,
MRO, MUR, PKR, PYG, RSD, RWF, SLL, SOS, STD, SYP, TMM, TRL, TZS, UGX, UZS, UYI,
VND, VUV, XAF, XOF, XPF, YER, ZMK, ZWD

Fixes globalizejs#472
Fixes globalizejs#565
@patch
Copy link
Copy Markdown
Contributor Author

patch commented Nov 30, 2017

@rxaviers, I'm still interested in fixing this issue. Have you had a chance to look at this PR?

@rxaviers rxaviers merged commit 95ed5d8 into globalizejs:master Dec 1, 2017
@rxaviers
Copy link
Copy Markdown
Member

rxaviers commented Dec 1, 2017

Thank you!!

PS: This got lost in my TODO backlog, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants