SoftBank.Cldr.Money.zero

You're seeing just the function zero, go back to SoftBank.Cldr.Money module for more information.
Link to this function

zero(money, options \\ [])

View Source

Specs

Return a zero amount t:Money in the given currency.

Arguments

  • money_or_currency is either a t:Money or a currency code

  • options is a keyword list of options passed to Money.new/3. The default is [].

Example

iex> SoftBank.Cldr.Money.zero(:USD)
#Money<:USD, 0>

iex> money = Money.new(:USD, 200)
iex> SoftBank.Cldr.Money.zero(money)
#Money<:USD, 0>

iex> SoftBank.Cldr.Money.zero :ZZZ
{:error, {Cldr.UnknownCurrencyError, "The currency :ZZZ is invalid"}}