Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Dec 1, 2017

Conversation

patch
Copy link
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
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
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
Projects
None yet
2 participants