SoftBank.Cldr.Money.abs

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

Specs

abs(money :: Money.t()) :: Money.t()

The absolute value of a Money amount. Returns a Money type with a positive sign for the amount.

Arguments

  • money is any valid Money.t type returned by Money.new/2

Returns

  • a Money.t

Example

iex> m = SoftBank.Cldr.Money.new("USD", -100)
iex> SoftBank.Cldr.Money.abs(m)
#Money<:USD, 100>