MyApp.Cldr.Territory.children

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

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

View Source

Specs

Lists children(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.children(:EU)
{:ok,
[:AT, :BE, :CY, :CZ, :DE, :DK, :EE, :ES, :FI, :FR, :GR, :HR, :HU, :IE,
  :IT, :LT, :LU, :LV, :MT, :NL, :PL, :PT, :SE, :SI, :SK, :BG, :RO]}

iex> MyApp.Cldr.Territory.children(:ZZZ)
{:error, {Cldr.UnknownTerritoryError, "The territory :ZZZ is unknown"}}

iex> MyApp.Cldr.Territory.children(:GB)
{:error, {Cldr.UnknownParentError, "The territory :GB has no children"}}