TimeZoneInfo.Transformer.Rule (TimeZoneInfo v0.7.8)

View Source

This module handles and transforms the IANA rules.

Summary

Functions

Returns all rules form the rule set that are for now valid until end of time.

Returns true if rule is valid until end of time or one of the rules is valid until end of time.

Returns a rule-set for the given rules.

Returns a map of rule-set for the given map of rules.

Transforms a IanaParser.rule to a TimeZoneInfo.rule. If the function gets a list then all rules will be transformed.

Functions

max(rules)

Returns all rules form the rule set that are for now valid until end of time.

max?(rule_or_rules)

@spec max?(rule | rules) :: boolean()
when rule: TimeZoneInfo.IanaParser.rule(),
     rules: [TimeZoneInfo.IanaParser.rule()]

Returns true if rule is valid until end of time or one of the rules is valid until end of time.

to_rule_set(rules, lookahead)

Returns a rule-set for the given rules.

to_rule_sets(rules, lookahead)

@spec to_rule_sets(
  %{required(String.t()) => [TimeZoneInfo.rule()]},
  non_neg_integer()
) :: %{
  required(String.t()) => TimeZoneInfo.Transformer.RuleSet.t()
}

Returns a map of rule-set for the given map of rules.

transform(rule)

@spec transform(rule | rules) :: TimeZoneInfo.rule() | [TimeZoneInfo.rule()]
when rule: TimeZoneInfo.IanaParser.rule(),
     rules: [TimeZoneInfo.IanaParser.rule()]

Transforms a IanaParser.rule to a TimeZoneInfo.rule. If the function gets a list then all rules will be transformed.