Cldr.Currency.territory_currencies
You're seeing just the function
territory_currencies
, go back to Cldr.Currency module for more information.
Returns a mapping of all ISO3166 territory codes and a list of historic and the current currency for those territories.
Example
iex> Cldr.Currency.territory_currencies |> Map.get(:LT)
%{
EUR: %{from: ~D[2015-01-01], to: nil},
LTL: %{from: nil, to: ~D[2014-12-31]},
LTT: %{from: nil, to: ~D[1993-06-25]},
SUR: %{from: nil, to: ~D[1992-10-01]}
}
Returns a list of currencies associated with a given territory.
Arguments
territory
is any valid ISO 3166 Alpha-2 territory code. SeeCldr.validate_territory/1
.
Returns
{:ok, map}
wheremap
has as its key at:Cldr.Currency
struct and the value is a map of validity dates for that currency; or{:error, {exception, reason}}
Example
iex> Cldr.Currency.territory_currencies(:LT)
%{
EUR: %{from: ~D[2015-01-01], to: nil},
LTL: %{from: nil, to: ~D[2014-12-31]},
LTT: %{from: nil, to: ~D[1993-06-25]},
SUR: %{from: nil, to: ~D[1992-10-01]}
}