openexchangerates / accounting.js

A lightweight JavaScript library for number, money and currency formatting - fully localisable, zero dependencies.
http://openexchangerates.github.io/accounting.js
MIT License
4.95k stars 532 forks source link

negative currency should have special formating #12

Closed millermedeiros closed 13 years ago

millermedeiros commented 13 years ago

if you check the way Microsoft Excel and Google Docs handle negative currency they put the - before the currency sign.

current output: $-1,234.56

expected output: -$ 1,234.56 (see #11)

wjcrowcroft commented 13 years ago

In my Excel, negative values are given as e.g. $ -1,000,000 but I agree that similar to #10 this should be a setting with a default value.

wjcrowcroft commented 13 years ago

covered by #17, which discusses formatting in more details. v0.2 should provide a way to specify a special format for negative values