MyApp.Cldr.Territory.parent

You're seeing just the function parent, go back to MyApp.Cldr.Territory module for more information.
Link to this function

parent(territory_code, opts \\ [as: :atom])

View Source

Specs

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)"}}