Cldr.DateTime.Formatter.zone_id

You're seeing just the function zone_id, go back to Cldr.DateTime.Formatter module for more information.
Link to this function

zone_id(zone_id, n \\ 1, options \\ [])

View Source

Specs

zone_id(Calendar.time(), integer(), Keyword.t()) ::
  String.t() | {:error, String.t()}

Returns the time zone ID (format symbol V) part of a DateTime or Time

For now the short timezone name, exemplar city and generic location formats are not supported and therefore return the fallbacks defined in CLDR.

Arguments

Format Symbol

The representation of the timezone ID is made in accordance with the following table:

SymbolResultsDescription
V"unk":zone_abbr key, unlocalised
VV"Etc/UTCDelegates to zone_gmt/4
VVV"Unknown City"Examplar city. Not supported.
VVVV"GMT"Delegates to `zone_gmt/4

Examples

iex> Cldr.DateTime.Formatter.zone_id %{time_zone: "Etc/UTC",
...>   utc_offset: 0, std_offset: 0}, 1
"unk"

iex> Cldr.DateTime.Formatter.zone_id %{time_zone: "Etc/UTC",
...>   utc_offset: 0, std_offset: 0}, 2
"Etc/UTC"

iex> Cldr.DateTime.Formatter.zone_id %{time_zone: "Etc/UTC",
...>   utc_offset: 0, std_offset: 0}, 3
"Unknown City"

iex> Cldr.DateTime.Formatter.zone_id %{time_zone: "Etc/UTC",
...>   utc_offset: 0, std_offset: 0}, 4
"GMT"
Link to this function

zone_id(time, n, locale, backend, options \\ [])

View Source

Specs

zone_id(Calendar.time(), integer(), locale(), Cldr.backend(), Keyword.t()) ::
  String.t() | {:error, String.t()}