SoftBank.Cldr.Money.to_decimal

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

Specs

to_decimal(money :: Money.t()) :: Decimal.t()

Returns the amount part of a Money type as a Decimal

Arguments

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

Returns

  • a Decimal.t

Example

iex> m = SoftBank.Cldr.Money.new("USD", 100)
iex> SoftBank.Cldr.Money.to_decimal(m)
#Decimal<100>