Numeral-js: Space between symbol and value

Created on 25 Jan 2017  路  5Comments  路  Source: adamwdraper/Numeral-js

I'm using the "pt-br" location, I'd like to add a space between the symbol and the value. When I add space it goes wrong.

Current example: R $1.000,1236 // space between R and $, but not value

*Correct example: R$ 1.000,1236 // current space between R$ and value

How can I adjust this?

Most helpful comment

fixed in 2.0.5

All 5 comments

The simillar case. I'm using "cs" locale, when I try to format value I get:
123,00K 膷 and it should be 123,00 K膷

@kamihouse Seems to have fixed and made pull request but the same is not accepting, having accumulated several pull requests. Weird.

The library works fine for single letter currency symbols. Spacing issues for multi letter currency symbols has been fixed in this PR #461 . Simply replaces $ with current locale symbol. Depends on you were you put $ symbol.

For locale "pt-br":
numeral(1000.1236).format('$ 0,0.000') -> R$ 1.000,124
numeral(1000.1236).format('$0,0.000') -> R$1.000,124
numeral(1000.1236).format('0,0.000 $') -> 1.000,124 R$

For locale "cs":
numeral(123.00).format('0.00$') -> 123,00K膷
numeral(123.00).format('0.00 $') -> 123,00 K膷
numeral(123.00).format('$ 0.00') -> K膷 123,00

I don't know if it's the same problem, but I find another issue with space between value and symbol:
numeral("999999").format("0[.]0 a") -> 1 k
numeral("999999").format("0[.]0a") -> 1m

fixed in 2.0.5

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonathanbergson picture jonathanbergson  路  6Comments

chumager picture chumager  路  3Comments

meafmira picture meafmira  路  8Comments

tab00 picture tab00  路  8Comments

fabien-h picture fabien-h  路  9Comments