time_zone_info v0.1.1 TimeZoneInfo.IanaParser View Source
The IANA-Parser builds the data structure for TimeZoneInfo
.
The format of the IANA data explains the article How to Read the tz Database Source Files
Link to this section Summary
Functions
Builds the data structure IanaParser.output
from the iana_data
.
Builds the data structure IanaParser.output
from the IANA data in files
under path
.
Link to this section Types
The raw IANA data.
Link to this type
day()
View Sourceday() :: non_neg_integer() | [{:last_day_of_week, Calendar.day_of_week()}] | [day: Calendar.day(), op: op(), day_of_week: Calendar.day_of_week()]
Link to this type
output()
View Sourceoutput() :: %{ optional(:zones) => %{required(Calendar.time_zone()) => [zone()]}, optional(:rules) => %{required(TimeZoneInfo.rule_name()) => [rule()]}, optional(:links) => %{required(Calendar.time_zone()) => Calendar.time_zone()} }
The parsed data.
Link to this type
rule()
View Sourcerule() :: [ from: Calendar.year(), to: Calendar.year() | :only, in: Calendar.month(), on: day(), at: time(), time_standard: TimeZoneInfo.time_standard(), std_offset: Calendar.std_offset(), letters: String.t() | nil ]
Link to this type
time()
View Sourcetime() :: {Calendar.hour(), Calendar.minute(), Calendar.second()}
Link to this type
until()
View Sourceuntil() :: {Calendar.year()} | {Calendar.year(), Calendar.month()} | {Calendar.year(), Calendar.month(), day()} | {Calendar.year(), Calendar.month(), day(), Calendar.hour()} | {Calendar.year(), Calendar.month(), day(), Calendar.hour(), Calendar.minute()} | {Calendar.year(), Calendar.month(), day(), Calendar.hour(), Calendar.minute(), Calendar.second()}
Link to this type
zone()
View Sourcezone() :: [ utc_offset: Calendar.utc_offset(), rules: String.t() | integer() | nil, format: TimeZoneInfo.zone_abbr_format(), until: until(), time_standard: TimeZoneInfo.time_standard() ]
Link to this section Functions
Link to this function
parse(iana_data)
View Sourceparse(data()) :: {:ok, output()} | {:error, rest, line, byte_offset} when rest: String.t(), line: non_neg_integer(), byte_offset: non_neg_integer()
Builds the data structure IanaParser.output
from the iana_data
.
Link to this function
parse(path, files)
View Sourceparse(Path.t(), String.t()) :: {:ok, output()} | {:error, rest, line, byte_offset} when rest: String.t(), line: non_neg_integer(), byte_offset: non_neg_integer()
Builds the data structure IanaParser.output
from the IANA data in files
under path
.