0

This problem seems to happen for every number between 1000 to 9999.99999... when using any spanish locale

(9999.99).toLocaleString('es')
"9999,99"   // should be "9.999,99"

(10000.01).toLocaleString('es')
"10.000,01"

Is this a bug or part of the locale standard?.

Tested in the console on Chrome and Firefox

Madacol
  • 3,611
  • 34
  • 33
  • Why do you think it should print the separator? – Etheryte Dec 03 '19 at 23:32
  • @Nit Windows-Excel does, and I find it suspicious that most(probably all) spanish locales works this way – Madacol Dec 03 '19 at 23:35
  • looks like it's how `es` locale is specified - so the code works as expected – Jaromanda X Dec 03 '19 at 23:38
  • Nobody in the spanish-speaker world would think this is correct behavior, it's clearly a bug. Someone with enough authority "designed" it to be that way and now buggy implementations roam the world. This is what happens when commitees don't align with the real-world. – Alejandro Jul 23 '21 at 01:04
  • @Alejandro I believe so too, but I don't like to generalize, so my experiences are in the financial sector of Venezuela, Perú and with less confidence Colombia, and I'm pretty sure it's written 1.000 – Madacol Aug 01 '21 at 08:49

0 Answers0