MikeMcl/decimal.js

Problem of conversion in the Russian locale

de-don opened this issue · 1 comments

There is a problem in Russian locale:

const d1 = new Decimal('0.05');
const stringValue = d1.toString();
console.log(stringValue)
// Output: 0,05 (with comma);

const d2 = new Decimal(stringValue);
// ERROR Error: Uncaught (in promise): Error: [DecimalError] Invalid argument: 0,05

decimal.js@10.3.1

image

Oh no, it's my fault.