gentooboontoo / js-quantities

JavaScript library for quantity calculation and unit conversion
http://gentooboontoo.github.io/js-quantities/
MIT License
396 stars 102 forks source link

Values formatted with group separators do not parse #136

Open kawazoe opened 1 year ago

kawazoe commented 1 year ago

I've recently tried to use js-quantities to parse values produced by UnitsNet which formats units according to the user's locale. On my machine, the grouping separator is the comma , at every 3 digits. This means that the following values are all valid values: 4 kg, 4.5 kg, 450.5 kg, and 4,500.5 kg.

js-quantities does not seam to support grouping separators, so Qty.parse('4,500 kg') returns null.

My locale is en-CA.