gabrewer.com

Life is too important to be take seriously.

Nice JavaScript library for formating numbers and currency

Saturday, April 6, 2013 at 7:56 PM UTC

In my continuing effort to really learn JavaScript, I was working on putting together a shopping cart application using JavaScript.  One of the things I needed to do was format some of values as currency. 

So I started looking around at the various techniques to accomplish this and ran across accounting.js a tiny JavaScript for number, money and currency formatting that seemed to fit the bill nicely. 

Now I can just do this.

accounting.formatMoney(12345678);    // $12,345,678.00
http://josscrowcroft.github.com/accounting.js/