HcpShadow / jquery-numberformatter

Automatically exported from code.google.com/p/jquery-numberformatter
0 stars 0 forks source link

Formatting problem with more than one group separator #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. User inputs number with more than one group separator (e.g. 5,000,000)
2. Call "format" function
3. Notice that you get a "NaN"

What is the expected output? What do you see instead?
I expect to get back "5,000,000" (or whatever, based on format string). Instead 
I'm getting NaN.

What version of the product are you using? On what operating system?
Firefox 3.0.7, Mac OS X 10.4.11

Please provide any additional information below.
The "text.replace(group,'')" only removes the first instance of the grouping 
separator. It should 
remove all of them. See attached for a patch.

Original issue reported on code.google.com by scdietr...@gmail.com on 11 Mar 2009 at 4:45

Attachments:

GoogleCodeExporter commented 8 years ago
Fixed, but didn't use the recommended patch you supplied as it worked only with 
US
formats (didn't work with German).  Put another fix in instead.

Original comment by bluedevi...@gmail.com on 13 Mar 2009 at 1:43

GoogleCodeExporter commented 8 years ago

Original comment by bluedevi...@gmail.com on 13 Mar 2009 at 1:43