[jquery-dev] Re: Locale support in jquery

2009-07-08 Thread Ricardo

That was just to exemplify that formatting is not that hard a task.
Last time I needed it, I used something like the line below to format
the number correctly regardless of locale, removing all but the last
separator:

num.replace(/([^\d])(?=\d+[^\d])/g, '');

I'm not sure that will work for every situation.

On Jul 6, 9:04 am, Peter Higgins  wrote:
> "1,200,000.42".replace(',','.')
>
> >>> 1.200.000.42
>
> expected:
> 1.200.000,42
>
> Unless you aren't using cents, but that seems entirely shortsided.
>
> Regards,
> Peter
>
> Ricardo wrote:
> > Ah. That's a simple case of val.replace(',', '.').
> > parseInt() can handle both, as it ignores the first non-numeric
> > character.
>
> > On Jul 6, 4:16 am, "Anthony Johnston" 
> > wrote:
>
> >> Apologies for the [spam] marker, its the spam assassin engine being a bit
> >> vigorous.
> >> Switched it off now
> >> Here's what I said, in case it got stopped ...
>
> >> Don't French/German people enter numbers using a comma for the decimal
> >> place?
> >> 1,5 == 1.5
>
> >> So Number(1,5) should work in a French locale
>
> >> Ant
>
> >> -Original Message-
> >> From: jquery-dev@googlegroups.com [mailto:jquery-...@googlegroups.com] On
>
> >> Behalf Of Ricardo
> >> Sent: 06 July 2009 03:38
> >> To: jQuery Development
> >> Subject: [Spam] [jquery-dev] Re: Locale support in jquery
>
> >> Well.. unless you're using roman numbers or other system a number is a
> >> number. The Number() constructor simply converts a string '15' to an
> >> integer/float. What impact would locale have on this?
>
> >> On Jul 4, 6:12 am, "Anthony Johnston" 
> >> wrote:
>
> >>> Thanks Daniel and Ricardo
>
> >>> I'll have a look at those.
>
> >>> So is it the case that js Number() does not support locale input?
>
> >>> So if you were developing a js calculator for a French/German audience you
> >>> would not be able to do
> >>> var num = Number($("#Num").val());
>
> >>> If this is the case how is it done?
>
> >>> Ant
>
> >>> -Original Message-
> >>> From: jquery-dev@googlegroups.com [mailto:jquery-...@googlegroups.com] On
>
> >>> Behalf Of Daniel Friesen
> >>> Sent: 03 July 2009 22:22
> >>> To: jquery-dev@googlegroups.com
> >>> Subject: [Spam] [jquery-dev] Re: Locale support in jquery
>
> >>> jQuery.ui's datepicker has parse/format support and options can be used
> >>> to localize both the datepicker and parsing/formatting.
>
> >>> ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]
>
> >>> Ricardo wrote:
>
> >>>> Not a jQ plugin but worth a good look:http://www.datejs.com/
>
> >>>> On Jul 2, 6:45 am, Ant  wrote:
>
> >>>>> Hi,
>
> >>>>> Does jQuery or a plugin provide number and date parsing for the
> >>>>> current culture?
>
> >>>>> There is support in the Microsoft.Ajax library, but I was a bit
> >>>>> reluctant to add this to my project as its large and has a lot of
> >>>>> overlap with jQuery.
>
> >>>>> Ta, Ant
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: Locale support in jquery

2009-07-07 Thread Ant

Its about 50/50 according to the ones on my machine anyway

so...
var fullStopCultures = ["", "ar-sa", "zh-tw", "en-us", "he-
il", "ja-jp", "ko-kr", "th-th", "ur-pk", "fa-ir", "hy-am", "af-za",
"hi-in", "sw-ke", "pa-in", "gu-in", "ta-in", "te-in", "kn-in", "mr-
in", "sa-in", "kok-in", "syr-sy", "dv-mv", "ar-iq", "zh-cn", "de-ch",
"en-gb", "es-mx", "it-ch", "ar-eg", "zh-hk", "en-au", "ar-ly", "zh-
sg", "en-ca", "es-gt", "fr-ch", "ar-dz", "zh-mo", "de-li", "en-nz",
"ar-ma", "en-ie", "es-pa", "ar-tn", "en-za", "es-do", "ar-om", "en-
jm", "ar-ye", "en-029", "ar-sy", "en-bz", "es-pe", "ar-jo", "en-tt",
"ar-lb", "en-zw", "ar-kw", "en-ph", "ar-ae", "ar-bh", "ar-qa", "es-
sv", "es-hn", "es-ni", "es-pr", "bn-bd", "en-sg", "en-my", "mn-mong-
cn", "qut-gt", "rm-ch", "mi-nz", "ug-cn", "moh-ca", "ga-ie", "ii-cn",
"quz-pe", "ig-ng", "nso-za", "yo-ng", "ha-latn-ng", "fil-ph", "ne-np",
"am-et", "iu-cans-ca", "si-lk", "lo-la", "km-kh", "cy-gb", "bo-cn",
"as-in", "ml-in", "or-in", "bn-in", "en-in", "es-us", "mt-mt", "zu-
za", "xh-za", "tn-za", "iu-latn-ca"];
function numberLocale(value, locale) {
return Number(value.replace(fullStopCultures.indexOf
((locale || navigator.language || navigator.userLanguage).toLowerCase
()) > -1 ? /[^0-9\.]/ : /[^0-9,]/, ""));
}

This i will remove everything but the decimal marker according to the
locale passed or the one your browser is set to.
Changing the language list in your browser does not work in this case
as navigator.language || navigator.userLanguage pick up the accepted
languages.
So to support the accepted languages, I'm going for a server-side
solution which is a shame, but there we go.

Ant

On Jul 6, 9:21 pm, Már  wrote:
> On Jul 6, 7:10 pm, "Anthony Johnston" 
> wrote:
>
> > 1.200,45 is a valid number format for some locales
>
> Actually, it's a valid format for lots and lots! of locales. :-)
> 1 200,45 and 1'200,45 are also fairly common formats.
>
> --
> Már
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: Locale support in jquery

2009-07-06 Thread Már

On Jul 6, 7:10 pm, "Anthony Johnston" 
wrote:
> 1.200,45 is a valid number format for some locales

Actually, it's a valid format for lots and lots! of locales. :-)
1 200,45 and 1'200,45 are also fairly common formats.

--
Már
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: Locale support in jquery

2009-07-06 Thread Anthony Johnston

Yup, also, the full stop is used as a thousand separator

1.200,45 is a valid number format for some locales

Take the following page




function parse() {
try{
var userInput = document.getElementById("UserInput");

alert(userInput.value);
alert(parseFloat(userInput.value));
alert(Number(userInput.value));
}catch(e){}
}











Set the browser to French, enter 1,5 into the textbox
You get three dialogs
1,5
1
NaN

-Original Message-
From: jquery-dev@googlegroups.com [mailto:jquery-...@googlegroups.com] On
Behalf Of Peter Higgins
Sent: 06 July 2009 13:04
To: jquery-dev@googlegroups.com
Subject: [jquery-dev] Re: Locale support in jquery



"1,200,000.42".replace(',','.')
>>> 1.200.000.42

expected:
1.200.000,42

Unless you aren't using cents, but that seems entirely shortsided.

Regards,
Peter


Ricardo wrote:
> Ah. That's a simple case of val.replace(',', '.').
> parseInt() can handle both, as it ignores the first non-numeric
> character.
>
> On Jul 6, 4:16 am, "Anthony Johnston" 
> wrote:
>   
>> Apologies for the [spam] marker, its the spam assassin engine being a bit
>> vigorous.
>> Switched it off now
>> Here's what I said, in case it got stopped ...
>>
>> Don't French/German people enter numbers using a comma for the decimal
>> place?
>> 1,5 == 1.5
>>
>> So Number(1,5) should work in a French locale
>>
>> Ant
>>
>> -Original Message-
>> From: jquery-dev@googlegroups.com [mailto:jquery-...@googlegroups.com] On
>>
>> Behalf Of Ricardo
>> Sent: 06 July 2009 03:38
>> To: jQuery Development
>> Subject: [Spam] [jquery-dev] Re: Locale support in jquery
>>
>> Well.. unless you're using roman numbers or other system a number is a
>> number. The Number() constructor simply converts a string '15' to an
>> integer/float. What impact would locale have on this?
>>
>> On Jul 4, 6:12 am, "Anthony Johnston" 
>> wrote:
>> 
>>> Thanks Daniel and Ricardo
>>>   
>>> I'll have a look at those.
>>>   
>>> So is it the case that js Number() does not support locale input?
>>>   
>>> So if you were developing a js calculator for a French/German audience
you
>>> would not be able to do
>>> var num = Number($("#Num").val());
>>>   
>>> If this is the case how is it done?
>>>   
>>> Ant
>>>   
>>> -Original Message-
>>> From: jquery-dev@googlegroups.com [mailto:jquery-...@googlegroups.com]
On
>>>   
>>> Behalf Of Daniel Friesen
>>> Sent: 03 July 2009 22:22
>>> To: jquery-dev@googlegroups.com
>>> Subject: [Spam] [jquery-dev] Re: Locale support in jquery
>>>   
>>> jQuery.ui's datepicker has parse/format support and options can be used
>>> to localize both the datepicker and parsing/formatting.
>>>   
>>> ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]
>>>   
>>> Ricardo wrote:
>>>   
>>>> Not a jQ plugin but worth a good look:http://www.datejs.com/
>>>> 
>>>> On Jul 2, 6:45 am, Ant  wrote:
>>>> 
>>>>> Hi,
>>>>>   
>>>>> Does jQuery or a plugin provide number and date parsing for the
>>>>> current culture?
>>>>>   
>>>>> There is support in the Microsoft.Ajax library, but I was a bit
>>>>> reluctant to add this to my project as its large and has a lot of
>>>>> overlap with jQuery.
>>>>>   
>>>>> Ta, Ant
>>>>>   
> >
>
>   




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: Locale support in jquery

2009-07-06 Thread Peter Higgins


"1,200,000.42".replace(',','.')
>>> 1.200.000.42

expected:
1.200.000,42

Unless you aren't using cents, but that seems entirely shortsided.

Regards,
Peter


Ricardo wrote:
> Ah. That's a simple case of val.replace(',', '.').
> parseInt() can handle both, as it ignores the first non-numeric
> character.
>
> On Jul 6, 4:16 am, "Anthony Johnston" 
> wrote:
>   
>> Apologies for the [spam] marker, its the spam assassin engine being a bit
>> vigorous.
>> Switched it off now
>> Here's what I said, in case it got stopped ...
>>
>> Don't French/German people enter numbers using a comma for the decimal
>> place?
>> 1,5 == 1.5
>>
>> So Number(1,5) should work in a French locale
>>
>> Ant
>>
>> -Original Message-----
>> From: jquery-dev@googlegroups.com [mailto:jquery-...@googlegroups.com] On
>>
>> Behalf Of Ricardo
>> Sent: 06 July 2009 03:38
>> To: jQuery Development
>> Subject: [Spam] [jquery-dev] Re: Locale support in jquery
>>
>> Well.. unless you're using roman numbers or other system a number is a
>> number. The Number() constructor simply converts a string '15' to an
>> integer/float. What impact would locale have on this?
>>
>> On Jul 4, 6:12 am, "Anthony Johnston" 
>> wrote:
>> 
>>> Thanks Daniel and Ricardo
>>>   
>>> I'll have a look at those.
>>>   
>>> So is it the case that js Number() does not support locale input?
>>>   
>>> So if you were developing a js calculator for a French/German audience you
>>> would not be able to do
>>> var num = Number($("#Num").val());
>>>   
>>> If this is the case how is it done?
>>>   
>>> Ant
>>>   
>>> -Original Message-
>>> From: jquery-dev@googlegroups.com [mailto:jquery-...@googlegroups.com] On
>>>   
>>> Behalf Of Daniel Friesen
>>> Sent: 03 July 2009 22:22
>>> To: jquery-dev@googlegroups.com
>>> Subject: [Spam] [jquery-dev] Re: Locale support in jquery
>>>   
>>> jQuery.ui's datepicker has parse/format support and options can be used
>>> to localize both the datepicker and parsing/formatting.
>>>   
>>> ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]
>>>   
>>> Ricardo wrote:
>>>   
>>>> Not a jQ plugin but worth a good look:http://www.datejs.com/
>>>> 
>>>> On Jul 2, 6:45 am, Ant  wrote:
>>>> 
>>>>> Hi,
>>>>>   
>>>>> Does jQuery or a plugin provide number and date parsing for the
>>>>> current culture?
>>>>>   
>>>>> There is support in the Microsoft.Ajax library, but I was a bit
>>>>> reluctant to add this to my project as its large and has a lot of
>>>>> overlap with jQuery.
>>>>>   
>>>>> Ta, Ant
>>>>>   
> >
>
>   


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: Locale support in jquery

2009-07-06 Thread Ricardo

Ah. That's a simple case of val.replace(',', '.').
parseInt() can handle both, as it ignores the first non-numeric
character.

On Jul 6, 4:16 am, "Anthony Johnston" 
wrote:
> Apologies for the [spam] marker, its the spam assassin engine being a bit
> vigorous.
> Switched it off now
> Here's what I said, in case it got stopped ...
>
> Don't French/German people enter numbers using a comma for the decimal
> place?
> 1,5 == 1.5
>
> So Number(1,5) should work in a French locale
>
> Ant
>
> -Original Message-
> From: jquery-dev@googlegroups.com [mailto:jquery-...@googlegroups.com] On
>
> Behalf Of Ricardo
> Sent: 06 July 2009 03:38
> To: jQuery Development
> Subject: [Spam] [jquery-dev] Re: Locale support in jquery
>
> Well.. unless you're using roman numbers or other system a number is a
> number. The Number() constructor simply converts a string '15' to an
> integer/float. What impact would locale have on this?
>
> On Jul 4, 6:12 am, "Anthony Johnston" 
> wrote:
> > Thanks Daniel and Ricardo
>
> > I'll have a look at those.
>
> > So is it the case that js Number() does not support locale input?
>
> > So if you were developing a js calculator for a French/German audience you
> > would not be able to do
> > var num = Number($("#Num").val());
>
> > If this is the case how is it done?
>
> > Ant
>
> > -Original Message-----
> > From: jquery-dev@googlegroups.com [mailto:jquery-...@googlegroups.com] On
>
> > Behalf Of Daniel Friesen
> > Sent: 03 July 2009 22:22
> > To: jquery-dev@googlegroups.com
> > Subject: [Spam] [jquery-dev] Re: Locale support in jquery
>
> > jQuery.ui's datepicker has parse/format support and options can be used
> > to localize both the datepicker and parsing/formatting.
>
> > ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]
>
> > Ricardo wrote:
> > > Not a jQ plugin but worth a good look:http://www.datejs.com/
>
> > > On Jul 2, 6:45 am, Ant  wrote:
>
> > >> Hi,
>
> > >> Does jQuery or a plugin provide number and date parsing for the
> > >> current culture?
>
> > >> There is support in the Microsoft.Ajax library, but I was a bit
> > >> reluctant to add this to my project as its large and has a lot of
> > >> overlap with jQuery.
>
> > >> Ta, Ant
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: Locale support in jquery

2009-07-06 Thread Anthony Johnston

Apologies for the [spam] marker, its the spam assassin engine being a bit
vigorous.
Switched it off now
Here's what I said, in case it got stopped ...

Don't French/German people enter numbers using a comma for the decimal
place?
1,5 == 1.5

So Number(1,5) should work in a French locale

Ant

-Original Message-
From: jquery-dev@googlegroups.com [mailto:jquery-...@googlegroups.com] On
Behalf Of Ricardo
Sent: 06 July 2009 03:38
To: jQuery Development
Subject: [Spam] [jquery-dev] Re: Locale support in jquery


Well.. unless you're using roman numbers or other system a number is a
number. The Number() constructor simply converts a string '15' to an
integer/float. What impact would locale have on this?

On Jul 4, 6:12 am, "Anthony Johnston" 
wrote:
> Thanks Daniel and Ricardo
>
> I'll have a look at those.
>
> So is it the case that js Number() does not support locale input?
>
> So if you were developing a js calculator for a French/German audience you
> would not be able to do
> var num = Number($("#Num").val());
>
> If this is the case how is it done?
>
> Ant
>
> -Original Message-
> From: jquery-dev@googlegroups.com [mailto:jquery-...@googlegroups.com] On
>
> Behalf Of Daniel Friesen
> Sent: 03 July 2009 22:22
> To: jquery-dev@googlegroups.com
> Subject: [Spam] [jquery-dev] Re: Locale support in jquery
>
> jQuery.ui's datepicker has parse/format support and options can be used
> to localize both the datepicker and parsing/formatting.
>
> ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]
>
> Ricardo wrote:
> > Not a jQ plugin but worth a good look:http://www.datejs.com/
>
> > On Jul 2, 6:45 am, Ant  wrote:
>
> >> Hi,
>
> >> Does jQuery or a plugin provide number and date parsing for the
> >> current culture?
>
> >> There is support in the Microsoft.Ajax library, but I was a bit
> >> reluctant to add this to my project as its large and has a lot of
> >> overlap with jQuery.
>
> >> Ta, Ant


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



RE: [Spam] [jquery-dev] Re: Locale support in jquery

2009-07-06 Thread Anthony Johnston

Don't French/German people enter numbers using a comma for the decimal
place?
1,5 == 1.5

So Number(1,5) should work in a French locale

Ant

-Original Message-
From: jquery-dev@googlegroups.com [mailto:jquery-...@googlegroups.com] On
Behalf Of Ricardo
Sent: 06 July 2009 03:38
To: jQuery Development
Subject: [Spam] [jquery-dev] Re: Locale support in jquery


Well.. unless you're using roman numbers or other system a number is a
number. The Number() constructor simply converts a string '15' to an
integer/float. What impact would locale have on this?

On Jul 4, 6:12 am, "Anthony Johnston" 
wrote:
> Thanks Daniel and Ricardo
>
> I'll have a look at those.
>
> So is it the case that js Number() does not support locale input?
>
> So if you were developing a js calculator for a French/German audience you
> would not be able to do
> var num = Number($("#Num").val());
>
> If this is the case how is it done?
>
> Ant
>
> -Original Message-
> From: jquery-dev@googlegroups.com [mailto:jquery-...@googlegroups.com] On
>
> Behalf Of Daniel Friesen
> Sent: 03 July 2009 22:22
> To: jquery-dev@googlegroups.com
> Subject: [Spam] [jquery-dev] Re: Locale support in jquery
>
> jQuery.ui's datepicker has parse/format support and options can be used
> to localize both the datepicker and parsing/formatting.
>
> ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]
>
> Ricardo wrote:
> > Not a jQ plugin but worth a good look:http://www.datejs.com/
>
> > On Jul 2, 6:45 am, Ant  wrote:
>
> >> Hi,
>
> >> Does jQuery or a plugin provide number and date parsing for the
> >> current culture?
>
> >> There is support in the Microsoft.Ajax library, but I was a bit
> >> reluctant to add this to my project as its large and has a lot of
> >> overlap with jQuery.
>
> >> Ta, Ant


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: Locale support in jquery

2009-07-05 Thread Ricardo

Well.. unless you're using roman numbers or other system a number is a
number. The Number() constructor simply converts a string '15' to an
integer/float. What impact would locale have on this?

On Jul 4, 6:12 am, "Anthony Johnston" 
wrote:
> Thanks Daniel and Ricardo
>
> I'll have a look at those.
>
> So is it the case that js Number() does not support locale input?
>
> So if you were developing a js calculator for a French/German audience you
> would not be able to do
> var num = Number($("#Num").val());
>
> If this is the case how is it done?
>
> Ant
>
> -Original Message-
> From: jquery-dev@googlegroups.com [mailto:jquery-...@googlegroups.com] On
>
> Behalf Of Daniel Friesen
> Sent: 03 July 2009 22:22
> To: jquery-dev@googlegroups.com
> Subject: [Spam] [jquery-dev] Re: Locale support in jquery
>
> jQuery.ui's datepicker has parse/format support and options can be used
> to localize both the datepicker and parsing/formatting.
>
> ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]
>
> Ricardo wrote:
> > Not a jQ plugin but worth a good look:http://www.datejs.com/
>
> > On Jul 2, 6:45 am, Ant  wrote:
>
> >> Hi,
>
> >> Does jQuery or a plugin provide number and date parsing for the
> >> current culture?
>
> >> There is support in the Microsoft.Ajax library, but I was a bit
> >> reluctant to add this to my project as its large and has a lot of
> >> overlap with jQuery.
>
> >> Ta, Ant
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: Locale support in jquery

2009-07-04 Thread Anthony Johnston

Thanks Daniel and Ricardo

I'll have a look at those.

So is it the case that js Number() does not support locale input?

So if you were developing a js calculator for a French/German audience you
would not be able to do 
var num = Number($("#Num").val());

If this is the case how is it done?

Ant

-Original Message-
From: jquery-dev@googlegroups.com [mailto:jquery-...@googlegroups.com] On
Behalf Of Daniel Friesen
Sent: 03 July 2009 22:22
To: jquery-dev@googlegroups.com
Subject: [Spam] [jquery-dev] Re: Locale support in jquery


jQuery.ui's datepicker has parse/format support and options can be used 
to localize both the datepicker and parsing/formatting.

~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]

Ricardo wrote:
> Not a jQ plugin but worth a good look: http://www.datejs.com/
>
> On Jul 2, 6:45 am, Ant  wrote:
>   
>> Hi,
>>
>> Does jQuery or a plugin provide number and date parsing for the
>> current culture?
>>
>> There is support in the Microsoft.Ajax library, but I was a bit
>> reluctant to add this to my project as its large and has a lot of
>> overlap with jQuery.
>>
>> Ta, Ant
>> 
> >
>   



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: Locale support in jquery

2009-07-03 Thread Daniel Friesen

jQuery.ui's datepicker has parse/format support and options can be used 
to localize both the datepicker and parsing/formatting.

~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]

Ricardo wrote:
> Not a jQ plugin but worth a good look: http://www.datejs.com/
>
> On Jul 2, 6:45 am, Ant  wrote:
>   
>> Hi,
>>
>> Does jQuery or a plugin provide number and date parsing for the
>> current culture?
>>
>> There is support in the Microsoft.Ajax library, but I was a bit
>> reluctant to add this to my project as its large and has a lot of
>> overlap with jQuery.
>>
>> Ta, Ant
>> 
> >
>   

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: Locale support in jquery

2009-07-03 Thread Ricardo

Not a jQ plugin but worth a good look: http://www.datejs.com/

On Jul 2, 6:45 am, Ant  wrote:
> Hi,
>
> Does jQuery or a plugin provide number and date parsing for the
> current culture?
>
> There is support in the Microsoft.Ajax library, but I was a bit
> reluctant to add this to my project as its large and has a lot of
> overlap with jQuery.
>
> Ta, Ant
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---