5

Sorry if this has been asked but I couldn't find anything...

The following code in Chrome, Firefox, etc, will return a currency symbol of 'US$':

new Intl.NumberFormat('en-CA', {
    style: 'currency',
    currencyDisplay: 'symbol',
    currency: 'USD'
}).format(65421.45)

And it will simply use '$' if the currency is set to 'CAD':

new Intl.NumberFormat('en-CA', {
    style: 'currency',
    currencyDisplay: 'symbol',
    currency: 'CAD'
}).format(65421.45)

But in all versions of IE and Edge that I've tested in, both of these examples will return a currency symbol of '$'. It will not return US$ or CA$, no matter the locale or currency used. (Same goes for AUD, HKD, etc.)

Example: https://jsfiddle.net/5wfzk7mf/

This also happens when I use react-intl's formatNumber() function, because it's using Intl.NumberFormat.

Am I missing something or is this a browser bug?

Kirsten
  • 51
  • 4

0 Answers0