Calendar v0.18.0 Calendar.TimeZoneData View Source

Deprecated: use the Tzdata library directly instead

Link to this section Summary

Functions

Takes the name of a zone. Returns true if zone exists and is canonical. Otherwise false.

Like zone_list, but excludes aliases for zones.

leap_seconds() deprecated

List of know leap seconds as DateTime structs

leap_seconds_erl() deprecated

List of known leap seconds in erlang tuple format in UTC.

links() deprecated

Returns a map of links. Also known as aliases.

periods(zone_name) deprecated

A list of pre-compiled periods for a given zone name.

tzdata_version() deprecated

Returns tzdata release version as a string.

zone_alias?(name) deprecated

Takes the name of a zone. Returns true if zone exists and is an alias. Otherwise false.

zone_alias_list() deprecated

A list of aliases for zone names. For instance Europe/Jersey is an alias for Europe/London. Aliases are also known as linked zones.

zone_exists?(name) deprecated

Takes the name of a zone. Returns true zone exists. Otherwise false.

zone_list() deprecated

zone_list provides a list of all the zone names that can be used with DateTime. This includes aliases.

Returns a map with keys being group names and the values lists of time zone names. The group names mirror the file names used by the tzinfo database.

Link to this section Functions

This function is deprecated. Use `Tzdata.canonical_zone?` instead..

Takes the name of a zone. Returns true if zone exists and is canonical. Otherwise false.

iex> Calendar.TimeZoneData.canonical_zone? "Europe/London"
true
iex> Calendar.TimeZoneData.canonical_zone? "Europe/Jersey"
false

Deprecated. Use Tzdata.canonical_zone? instead.

This function is deprecated. Use `Tzdata.canonical_zone_list` instead..

Like zone_list, but excludes aliases for zones.

Deprecated. Use Tzdata.canonical_zone_list instead.

This function is deprecated. Use `Tzdata.leap_seconds |> Enum.map(&Calendar.NaiveDateTime.from_erl!/1) |> Enum.map(&(DateTime.from_naive!(&1, "Etc/UTC")))` instead..

List of know leap seconds as DateTime structs

Example:

iex> TimeZoneData.leap_seconds |> Enum.take(2)
[%DateTime{zone_abbr: "UTC", day: 30, hour: 23, minute: 59, month: 6, second: 60, std_offset: 0, time_zone: "Etc/UTC", microsecond: {0, 0}, utc_offset: 0, year: 1972},
 %DateTime{zone_abbr: "UTC", day: 31, hour: 23, minute: 59, month: 12, second: 60, std_offset: 0, time_zone: "Etc/UTC", microsecond: {0, 0}, utc_offset: 0, year: 1972}]

Deprecated. Use Tzdata.leap_seconds |> Enum.map(&Calendar.NaiveDateTime.from_erl!/1) |> Enum.map(&(DateTime.from_naive!(&1, "Etc/UTC"))) instead.

This function is deprecated. Use `Tzdata.leap_seconds` instead..

List of known leap seconds in erlang tuple format in UTC.

Example:

iex> TimeZoneData.leap_seconds_erl |> Enum.take(2)
[{{1972, 6, 30}, {23, 59, 60}}, {{1972, 12, 31}, {23, 59, 60}}]

Deprecated. Use Tzdata.leap_seconds instead.

This function is deprecated. Use `Tzdata.links` instead..

Returns a map of links. Also known as aliases.

iex> Calendar.TimeZoneData.links["Europe/Jersey"]
"Europe/London"

Deprecated. Use Tzdata.links instead.

This function is deprecated. Use `Tzdata.periods(zone_name)` instead..

A list of pre-compiled periods for a given zone name.

Deprecated. Use Tzdata.periods(zone_name) instead.

Link to this function

periods_for_time(zone_name, time_point, time_type \\ :wall) View Source

This function is deprecated. Use `Tzdata.periods_for_time/3` instead.
This function is deprecated. Use `Tzdata.tzdata_version` instead..

Returns tzdata release version as a string.

Example:

Calendar.TimeZoneData.tzdata_version
"2014i"

Deprecated. Use Tzdata.tzdata_version instead.

This function is deprecated. Use `Tzdata.zone_alias?` instead..

Takes the name of a zone. Returns true if zone exists and is an alias. Otherwise false.

iex> Calendar.TimeZoneData.zone_alias? "Europe/Jersey"
true
iex> Calendar.TimeZoneData.zone_alias? "Europe/London"
false

Deprecated. Use Tzdata.zone_alias? instead.

This function is deprecated. Use `Tzdata.zone_alias_list` instead..

A list of aliases for zone names. For instance Europe/Jersey is an alias for Europe/London. Aliases are also known as linked zones.

Deprecated. Use Tzdata.zone_alias_list instead.

This function is deprecated. Use `Tzdata.zone_exists?` instead..

Takes the name of a zone. Returns true zone exists. Otherwise false.

iex> Calendar.TimeZoneData.zone_exists? "Pacific/Auckland"
true
iex> Calendar.TimeZoneData.zone_exists? "America/Sao_Paulo"
true
iex> Calendar.TimeZoneData.zone_exists? "Europe/Jersey"
true

Deprecated. Use Tzdata.zone_exists? instead.

This function is deprecated. Use `Tzdata.zone_list` instead..

zone_list provides a list of all the zone names that can be used with DateTime. This includes aliases.

Deprecated. Use Tzdata.zone_list instead.

This function is deprecated. Use `Tzdata.zone_lists_grouped` instead..

Returns a map with keys being group names and the values lists of time zone names. The group names mirror the file names used by the tzinfo database.

Deprecated. Use Tzdata.zone_lists_grouped instead.