CLDRex v0.0.7 CLDRex.Numbers
Provide number localization including conversion to currency, percentage, and decimal values.
Summary
Functions
Localize the given number
Convert the given number to the localized currency format
Convert the given number to the localized percentage format
Types
Functions
Localize the given number.
Accepted options are:
- precision: the floating point precision. default: nil - it will not round the fractional part of the number. Valid options are 0..15.
Examples
iex> CLDRex.Numbers.localize(12345, :en)
"12,345"
iex> CLDRex.Numbers.localize(12345.789, :en)
"12,345.789"
iex> CLDRex.Numbers.localize(12345.789, :en, precision: 2)
"12,345.79"
Convert the given number to the localized currency format.