My weekend project: accounting.js, tiny JS library for money/currency formatting(josscrowcroft.github.com)
josscrowcroft.github.com
My weekend project: accounting.js, tiny JS library for money/currency formatting
http://josscrowcroft.github.com/accounting.js/
5 comments
Nice project. Check also some of the i18n classes in Google's Closure package (http://code.google.com/closure/library/), for more comprehensive routines and support for almost any currency.
Sweet, thanks for the link - I'll read through it and see if I can improve or expand the library.
I think it'd also be useful if you included an enumeration of the common currency symbols. For example, accounting.DOLLAR, accounting.EURO, etc.
Yeah, that could work actually - I've purposefully left everything to do with symbols (apart from the standard dollar sign) up to the developer, to avoid bloat, but I can see a use case for the most common ones (along with default formatting for said symbols)
Thanks, for me it makes sense to use the smallest unit available as the main unit, i.e. cents not dollars / pence not pounds.
What are you using for minifying the javascript?
YUI - via http://refresh-sf.com/yui/ when I'm in a hurry.
Why, did you find errors, or room for improvement?
Why, did you find errors, or room for improvement?
Just curious. I'm not really a JS person
Well thank you very much, sir.