adamwdraper / Numeral-js

A javascript library for formatting and manipulating numbers.
http://numeraljs.com
MIT License
9.64k stars 926 forks source link

Currency code (ISO 4217) with space not displaying correctly #448

Open darkkean opened 7 years ago

darkkean commented 7 years ago

I am printing Danish krone currency using ISO 4217 currency code with a space before the digits.

Basically, I am expecting that this code will display: DKK 10.899.800

var num = 10899799.99;
numeral.locale('da-dk');
numeral(num).format('$ 0,0');

However the result I'm getting is: D KK10.899.800

A fiddle is available here: https://jsfiddle.net/b2yohx95/

mefjuu commented 7 years ago

It seems to be a similar problem to https://github.com/adamwdraper/Numeral-js/issues/439