currency-formatter icon indicating copy to clipboard operation
currency-formatter copied to clipboard

Locale's currency is detected case-insensitively while locale-specific formatting is detected case-sensitively

Open mmarvick opened this issue 7 years ago • 0 comments

The mapping between a locale and the currency is done case-insensitively, but the mapping between a locale and its locale format is done case sensitively. This can cause a locale's currency to be recognized, but not the formatting, if the user is not careful.

> currency.format("1234.56", { locale: 'en-ie' });
'1 234,56 €'
> currency.format("1234.56", { locale: 'en-IE' });
'€ 1,234.56'

mmarvick avatar Jan 23 '18 22:01 mmarvick