DEV Community

Discussion on: Formatting Numbers in JavaScript with Intl.NumberFormat

Collapse
 
tttony profile image
Tony

I needed to format a number and I just discovered that in spanish if the number 12345.67 it will print 12.345,67 cool but if the number is 1234.56 it will print 1234,56 not cool, it should be: 1.234,56, still looking a way to do it without regex

Collapse
 
orimdominic profile image
Orim Dominic Adah

Hello Tony. I am replying late, I guess, but I should. haha
What language locale are you converting from, and to?

Collapse
 
tttony profile image
Tony

No problem, I read this: stackoverflow.com/questions/589913..., so it's an expected behaviour