Closed joshhifyre closed 1 year ago
The main and most common symbol for the American dollar is $. Its change will lead to many surprises and bugs. You can override the currency if needed
@Nitrino the main and most common symbol for the Canadian dollar is also $. The change made in https://github.com/elixirmoney/money/commit/2bfeacf1b50dad17bc47bb9b0da7c262fe238e3b DID lead to many surprises and bugs for us. Please revert this change as no one uses "Can$".
Hey folks, is there a way to "override" the currency symbol for CAD? I'd prefer to have CA$
instead of Can$
throughout my application.
@PJUllrich Hey, you can add a custom currency with the same code and it will override the pre-defined one
config :money,
custom_currencies: [
CAD: %{name: "Canadian Dollar", symbol: "$", exponent: 2, number: 124},
]
iex(1)> Money.Currency.all()[:CAD]
%{name: "Canadian Dollar", number: 124, symbol: "$", exponent: 2}
iex(2)> Money.to_string(Money.new(100, :CAD))
"$1.00"
The symbol for the US Dollar is incorrect
Should be
US$
https://en.wikipedia.org/wiki/United_States_dollar
Needs to be consistent across countries following this update: https://github.com/elixirmoney/money/commit/2bfeacf1b50dad17bc47bb9b0da7c262fe238e3b