-
Notifications
You must be signed in to change notification settings - Fork 594
Open
Labels
Description
Globalize 1.2.2
The example speaks for itself:
Globalize.numberParser({style:"percent"})("50.555%"); => NaN
Globalize.numberParser({style:"percent", maximumFractionDigits: 2})("50.555%") => 0.50555 (actually 0.5055499999999999, but that is another problem)
In fact, I can put any number on the property maximumFractionDigits (which according to the documentation does not even exist on numberParser) and it will parse any number of decimals!
I would expect the first example to behave like the second, or I would like the documentation to be updated, and in that case also the bug which allows any number of decimals to be parsed no matter the value of maximumFractionDigits.