Cldr.DateTime.Formatter.zone_generic
You're seeing just the function
zone_generic, go back to Cldr.DateTime.Formatter module for more information.
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
timeis aTimestruct or any map that contains at least the key:time_zonekey of the format used byTimenis the generic non-location timezone format and is either1(the default) or4localeis any valid locale name returned byCldr.known_locale_names/0or aCldr.LanguageTagstruct. The default isCldr.get_locale/0optionsis aKeywordlist of options. There are no options used inzone_generic/4
Format Symbol
The representation of the timezone is made in accordance with the following
table:
| Symbol | Results | Description |
|---|---|---|
| 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"
Specs
zone_generic(Calendar.time(), integer(), locale(), Cldr.backend(), Keyword.t()) :: String.t() | {:error, String.t()}