locbet / jquery-numberformatter

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

Small Numbers get wrong Formating. #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
var fakediv= $("<div>");
fakediv.html(0.026030368763557687);
fakediv.format({format:"#,###.00", locale:"de"});

What is the expected output? What do you see instead?
0,02 but i get: 26.030.368.763.557.690,00

What version of the product are you using? On what operating system?
1.1.2 windows/firefox 3.6

Please provide any additional information below.

Original issue reported on code.google.com by puma.r...@gmail.com on 13 Aug 2010 at 11:56

GoogleCodeExporter commented 8 years ago
If i round the input before to 0.03 i get 3,00 which is also wrong :(

Original comment by puma.r...@gmail.com on 13 Aug 2010 at 12:01

GoogleCodeExporter commented 8 years ago
That's pretty nasty formatting :)

Version 1.2 supports rounding by default, round:"false" will give you 
truncation.

See attached for both usages.

Original comment by apar...@gmail.com on 9 Oct 2010 at 11:15

Attachments: