jueves, 8 de octubre de 2015

Setup the current number format

I´ve discovered the new way for setting up numbers in the current country format. I´m from Spain, so the numbers are like 12.345,67.

We can use.

var result = parseInt(simpleNumber).toLocaleString('es-ES');