combmag-zz / jquery-formatcurrency

Automatically exported from code.google.com/p/jquery-formatcurrency
GNU Lesser General Public License v3.0
2 stars 0 forks source link

1000.25 converts to $100,025,00 with decimalSymbol: ',' #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. The source is a number with decimals
2. I set the decimalSymbol option to ','
3. The number I get back has 2 extra decimals

What is the expected output? What do you see instead?
When I try to convert 1000.25, I should get $1,000.25 and not $100,025,00

What version of the product are you using? On what operating system?
Mac OS X 10.6.1,  Safari 4.0.3

Original issue reported on code.google.com by jf.tur...@gmail.com on 20 Oct 2009 at 8:16

GoogleCodeExporter commented 9 years ago
That's because the original script assume that the input number is in the same 
format
you expect as output.

This means that with the decimalSymbol equal to ',' you have to provide a 
number with
comma as decimal separator to the function in order to make it works correctly.

This is what I found it out looking a bit at the code.

Original comment by morpheus...@gmail.com on 25 Nov 2009 at 3:21

GoogleCodeExporter commented 9 years ago
morpheus.mytux is correct the input and output formats are expected to be the 
same. 
I'm putting this issue into an invalid state for now.  Please repond with more 
details if this should be fixed 

Original comment by bdewe...@hotmail.com on 28 Nov 2009 at 2:53

GoogleCodeExporter commented 9 years ago
Correction, after evaluating Issue 13 further I decided to put a isNaN check 
in.  
This fixes this issue as well.

Original comment by bdewe...@hotmail.com on 28 Nov 2009 at 3:29