MyApp.Cldr.Territory.parent
You're seeing just the function
parent
, go back to MyApp.Cldr.Territory module for more information.
Specs
parent(Cldr.Territory.atom_binary_tag(), Cldr.Territory.as_options()) :: {:ok, Cldr.Territory.atom_binary_charlist()} | {:error, Cldr.Territory.error()}
Lists parent(s) for the given territory code.
Returns {:ok, list}
if successful, otherwise {:error, reason}
.
options
are:as: :atom
as: :binary
as: :charlist
Example
iex> MyApp.Cldr.Territory.parent(:GB)
{:ok, [:"154", :UN]}
iex> MyApp.Cldr.Territory.parent(:ZZZ)
{:error, {Cldr.UnknownTerritoryError, "The territory :ZZZ is unknown"}}
iex> MyApp.Cldr.Territory.parent(Cldr.get_locale())
{:error, {Cldr.UnknownChildrenError, "The territory :\"001\" has no parent(s)"}}