time_zone_info v0.1.1 TimeZoneInfo.DataStore behaviour View Source
A behaviour to store data and serve them later on.
Link to this section Summary
Callbacks
Deletes all data in the data store.
Returns true if the DataSore
is empty.
Returns rules
for a given rule_name
.
Returns the list of all available time zones with or without links. The option
:links
can be used to customize the list.
Returns the transitions
for a given time_zone
.
Puts the given data
into the store.
Returns the version of the IANA database from which the data was generated.
Link to this section Callbacks
Deletes all data in the data store.
Returns true if the DataSore
is empty.
get_rules(rule_name)
View Sourceget_rules(rule_name :: TimeZoneInfo.rule_name()) :: {:ok, rules :: [TimeZoneInfo.rule()]} | {:error, :rule_not_found}
Returns rules
for a given rule_name
.
get_time_zones(list)
View Sourceget_time_zones([{:links, :ignore | :only | :include}]) :: [Calendar.time_zone()]
Returns the list of all available time zones with or without links. The option
:links
can be used to customize the list.
Values for :links
:
:ignore
just the time zone names will be returned:only
just the link name will be returned:include
the time zone and link names will be returned
The list will be sorted.
get_transitions(time_zone)
View Sourceget_transitions(time_zone :: Calendar.time_zone()) :: {:ok, transitions :: [TimeZoneInfo.transition()]} | {:error, :transitions_not_found}
Returns the transitions
for a given time_zone
.
Puts the given data
into the store.
Returns the version of the IANA database from which the data was generated.