locbet / jquery-numberformatter

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

Number formatting doesn't get applied when number is '0'. #44

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

$.formatNumber('000000000', {format:"000,000,000",locale:"de"})
or
$.formatNumber(0, {format:"000,000,000",locale:"de"})

What is the expected output? What do you see instead?

I would expect the result to be 000,000,000 but instead, the result is 000000000

What version of the product are you using? On what operating system?
jquery-numberformatter v1.2, jquery 1.6.1

Original issue reported on code.google.com by dan.imbrogno on 12 Jun 2011 at 4:04

GoogleCodeExporter commented 8 years ago
Thanks, will look into it very soon for the next release.

Original comment by apar...@gmail.com on 11 Sep 2011 at 4:32

GoogleCodeExporter commented 8 years ago
Yes, whilst this is not a real number of course, it should still force 
left-padding, the problem was it was wrongly assuming that there would be no 
group formatting to do in this extra left padding.

Fixed as of r16 and will be in 1.2.3 release, now takes account of real 
formatting for padding.

Original comment by apar...@gmail.com on 5 Feb 2012 at 12:41