locbet / jquery-numberformatter

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

formatNumber method doesn't really format anything #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. call $.formatNumber with a number and formatting options

What is the expected output? What do you see instead?
A formatted string (12345->12,345, I get 12345)

What version of the product are you using? On what operating system?
1.1.0

Please provide any additional information below.
I extracted the code that actaully does the formatting from $.fn.format 
and created a new formatNumber method that is called by $.fn.format for 
each JQuery object, but can also be called for any string representing a 
number.
I didn't see the point in keeping the old formatNumber method (it should 
probably be renamed to represent what it does, which is convert to locale)

jquery objects aren't the only way you might want to use this 
functionality, I needed this change to support number formatting in 
JavaScript Templates.

another small issue, $.format and $.parse are a generic names that are 
used by other unrelated plugins, it should probably be named 
$.formatNumber and $.parseNumber to avoid conflicts with other plugins

Original issue reported on code.google.com by ishaihac...@gmail.com on 24 Mar 2009 at 5:36

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the contribution. Have taken most of your feedback and integrated 
into the 
next version (which will be available in next few weeks).

Original comment by apar...@gmail.com on 18 Jan 2010 at 7:04