[Javascript] thousand separator / Lasik

Shawn Milo milo at linuxmail.org
Fri Jun 4 10:47:34 CDT 2004


Damn it all to hell.  Okay, I'll work on that, 
although I doubt that this function will become
the worldwide standard.  I'll just do it because
I'm "working from home" today.

My wife just got her Lasik done today, so I'm staying
home to take care of her.

Milo




----- Original Message -----
From: Paul Novitski <paul at novitskisoftware.com>
Date: Thu, 03 Jun 2004 14:24:36 -0700
To: "[JavaScript List]" <javascript at LaTech.edu>
Subject: Re: [Javascript] thousand separator

> At 01:22 PM 6/3/2004, Shawn Milo wrote:
> >As for the comma versus period thou delimiter,
> >I just decided to default to the period, and
> >change it to a comma if the browser is reporting
> >'us-en' (case insensitive).
> 
> 
> Nice work so far.
> 
> The internationality still needs to be filled out if this widget is to pass 
> for international.  For example, the Australian & Canadian thousands 
> separator is the same comma as in the US, the French is a space, the Swiss 
> (but which language?) is an apostrophe, and so on.  Therefore one might add:
> 
>          if (usTest.match(/en-(au|ca|us)/i)){ strThou = ',';}
>          if (usTest.match(/fr-/i)){ strThou = ' ';}
>          if (usTest.match(/-ch/i)){ strThou = "'";}
> etc.
> 
> Also variable is the number of digits between separators: I've just learned 
> that Chinese & Japanese separate every four digits with an ideograph 
> representing 10000, and in India the lowest three digits are grouped, then 
> every 2 digits after that!
> http://www.xencraft.com/resources/multi-currency.html
> 
> In a word: yikes.
> 
> Now back to work!  *Crack!*
> 
> Paul 
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list