Cldr v0.1.0 Cldr.Currency
Defines a currency structure and a set of functions to manage the validity of a currency code.
Summary
Functions
Returns the currency metadata for the requested currency code
Returns the currency metadata for a locale
Returns a list of all known currency codes
Returns a boolean indicating if the supplied currency code is known
Normalizes the representation of a currency code
Types
Functions
Returns the currency metadata for the requested currency code.
The currency code is a string representation of an ISO 4217 currency code.
Examples
iex> Cldr.Currency.for_code("AUD")
%Cldr.Currency{cash_digits: 2, cash_rounding: 0, code: "AUD",
count: %{one: "Australian dollar", other: "Australian dollars"},
digits: 2, name: "Australian Dollar", narrow_symbol: "$",
rounding: 0, symbol: "A$", tender: true}
iex> Cldr.Currency.for_code("THB")
%Cldr.Currency{cash_digits: 2, cash_rounding: 0, code: "THB",
count: %{one: "Thai baht", other: "Thai baht"}, digits: 2,
name: "Thai Baht", narrow_symbol: "฿", rounding: 0, symbol: "THB",
tender: true}
Returns the currency metadata for a locale.
Returns a list of all known currency codes.
Example
iex> Cldr.Currency.known_currencies |> Enum.count
298