Money.zero
You're seeing just the function
zero
, go back to Money module for more information.
Return a zero amount t:Money
in the given currency.
Arguments
money_or_currency
is either at:Money
or a currency codeoptions
is a keyword list of options passed toMoney.new/3
. The default is[]
.
Example
iex> Money.zero(:USD)
#Money<:USD, 0>
iex> money = Money.new(:USD, 200)
iex> Money.zero(money)
#Money<:USD, 0>
iex> Money.zero :ZZZ
{:error, {Cldr.UnknownCurrencyError, "The currency :ZZZ is invalid"}}