Cldr.DateTime.Formatter.zone_basic

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

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

View Source

Specs

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

Returns the basic zone offset (format symbol Z) part of a DateTime or Time,

The ISO8601 basic format with hours, minutes and optional seconds fields. The format is equivalent to RFC 822 zone format (when optional seconds field is absent). This is equivalent to the "xxxx" specifier.

Arguments

Format Symbol

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

SymbolResultsDescription
Z..ZZZ"+0100"ISO8601 Basic Format with hours and minutes
ZZZZ"+01:00"Delegates to `zone_gmt/4
ZZZZZ"+01:00:10"ISO8601 Extended format with optional seconds

Examples

iex> Cldr.DateTime.Formatter.zone_basic %{time_zone: "Etc/UTC",
...>   utc_offset: 3600, std_offset: 0}, 1
"+0100"

iex> Cldr.DateTime.Formatter.zone_basic %{time_zone: "Etc/UTC",
...>   utc_offset: 3610, std_offset: 0}, 4
"GMT+01:00"

iex> Cldr.DateTime.Formatter.zone_basic %{time_zone: "Etc/UTC",
...>   utc_offset: 0, std_offset: 0}, 5
"Z"

iex> Cldr.DateTime.Formatter.zone_basic %{time_zone: "Etc/UTC",
...>   utc_offset: 3610, std_offset: 0}, 5
"+01:00:10"
Link to this function

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

View Source

Specs

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