Xaprb

Stay curious!

JavaScript Number Formatting Library v1.3 released

with 10 comments

Download Number Formatting Library

I’ve updated my JavaScript Number Formatting Library to version 1.3. This release adds the ability to customize how not-a-number (NaN), positive infinity and negative infinity are formatted. All you need to do is set the appropriate constant in Number.prototype:

  • Number.prototype.NaN
  • Number.prototype.posInfinity
  • Number.prototype.negInfinity

For more documentation, see the original article on JavaScript number formatting.

Written by Xaprb

July 15th, 2007 at 9:52 am

10 Responses to 'JavaScript Number Formatting Library v1.3 released'

Subscribe to comments with RSS

  1. Hi,
    the download link isn’t working …
    please check it out

    Navin

    16 Jul 07 at 12:42 am

  2. Fixed, thanks!

    Xaprb

    16 Jul 07 at 8:38 am

  3. Thx for this little nice library. It’s the small snippets that ease our life :D

    ritzenhoff

    5 Aug 07 at 4:46 pm

  4. serious bug:

    var num = 90.9876;
    num.numberFormat(“$0,000.0″);

    result: 90.1

    Mike

    4 Dec 08 at 5:14 am

  5. [...] Also included is numeric, an extension on constrain. numeric accepts two options, a format (string) option and an onblur (bool). By defaultnumeric corrects the field on the text box’s blur event, but you may have numeric correct on the keyup event instead to strongly prohibit adding invalid number formats. Handling the formatting of numbers is done by adapting the number functions code athttp://www.xaprb.com/blog/2007/07/15/javascript-number-formatting-librar…. [...]

  6. What’s up with the Date Formatting library? It appears you’ve scrubbed all the posts from the blog and the downloads from the Google Code site. I’ve been using it happily for a couple weeks and just recommended it to a couple folks who were unable to find it. Is there a problem I should be aware of? Are you making it commercial software? (BTW, I would gladly pay for it considering how much time and pain it saves me.)

    Dan Blaker

    28 Apr 10 at 1:20 pm

  7. What’s up with the Date Formatting library? It appears you’ve scrubbed all the posts from the blog and the downloads from the Google Code site. I’ve been using it happily for a couple weeks and just recommended it to a couple folks who were unable to find it. Is there a problem I should be aware of? Are you making it commercial software? (BTW, I would gladly pay for it considering how much time and pain it saves me.)

    Dan Blaker

    28 Apr 10 at 1:20 pm

  8. No, it’s all still there. The wordpress search doesn’t find it for some reason, but Google does. And all the posts are linked from the google code project at http://code.google.com/p/flexible-js-formatting/

    There are no downloads — just get the code right from SVN.

    No plans to close-source it, actually, I feel badly about neglecting it but just don’t have time to maintain. I’ve given a handful of people commit rights on Google Code.

    Xaprb

    28 Apr 10 at 1:26 pm

  9. Thanks, I did eventually browse the SVN trunk to find it; for some reason, I thought it used to be under Downloads but this works for me. I bet you’d get a load of contributors if you made it a jQuery plugin—you wouldn’t even have to tell anybody that it’s pure Javascript.

    Dan Blaker

    28 Apr 10 at 4:32 pm

  10. I would welcome you to join the mailing list and suggest that. I personally don’t have time — I don’t even know what a jQuery plugin is. (I have been away from the JS world for a while).

    The problem with contributors is that someone has to be responsible for reviewing and accepting their changes ;-) It’s about 10x more work than it seems.

    Xaprb

    28 Apr 10 at 4:38 pm

Leave a Reply