Numeral-js: add space support bewteen thousands

Created on 31 Jan 2014  Â·  9Comments  Â·  Source: adamwdraper/Numeral-js

The 0,0.00 format works fine ; why not having a 0 0.00 format ? :)

Most helpful comment

For the record: The workaround proposed by @luishdz1010 should operate on localeData in the current version:

numeral.localeData().delimiters.thousands = ' ';

All 9 comments

+1

A simple workaround:

numeral.languageData().delimiters.thousands = ' ';

And you can just keep using '0,0.00'.

+1

+1 to @fabien-h . 1000000 as 1 000 000 would be nice :)

+1

Another workaround is:

numeral(1000000).format('0,0.00').replace(',',' ')

to have 1 000 000.00

In that case unformat won't work.

numeral.languageData().delimiters.thousands = ' ';

seems a better option.

On Fri, Sep 11, 2015 at 5:44 PM, andrewm-theodo [email protected]
wrote:

Another workaround is:

numeral(1000000).format('0,0.00').replace(',',' ')

to have 1 000 000.00

—
Reply to this email directly or view it on GitHub
https://github.com/adamwdraper/Numeral-js/issues/135#issuecomment-139530996
.

The workaround mentionned by andrewm-theodo is actually :
numeral(1000000).format('0,0').replace(/,/g,' ')

For the record: The workaround proposed by @luishdz1010 should operate on localeData in the current version:

numeral.localeData().delimiters.thousands = ' ';

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonathanbergson picture jonathanbergson  Â·  6Comments

MisterGoodcat picture MisterGoodcat  Â·  3Comments

tony-kerz picture tony-kerz  Â·  6Comments

kinguru picture kinguru  Â·  6Comments

tab00 picture tab00  Â·  8Comments