magic_al magic_al - 1 year ago 154
Javascript Question

Setting local settings fix for function toLocalString()

I format a

like this:

function pointToComma(number) {
number = Number(number).toLocaleString();
return number;

As w3schools ( states the function
convert a Date object to a string, using locale conventions.

I want to use this function to output the number into a german format. This means commas instead of points for decimals and points to separate thousands. I need the german format in any case. So is there a way to set the local settings fix in that example?

Answer Source

Solved it:


See more options

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download