Cldr.DateTime.Formatter.zone_generic

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

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

View Source

Specs

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

Returns the generic non-location format of a timezone (format symbol v) from a DateTime or Time.

Since Elixir does not provide full time zone support, we return here only the :time_zone element of the provided DateTime or other struct without any localization.

Arguments

Format Symbol

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

SymbolResultsDescription
v"Etc/UTC":time_zone key, unlocalised
vvvv"unk"Generic timezone name. Currently returns only "unk"

Examples

iex> Cldr.DateTime.Formatter.zone_generic %{time_zone: "Etc/UTC",
...>   utc_offset: 0, std_offset: 0}, 4
"GMT"

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

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

View Source

Specs

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