View Source Cldr.TimeZoneName behaviour (Cldr Time Zone Names v0.1.0)

Support for fetching time zone info by zone name and meta zone.

Link to this section Summary

Callbacks

Fetches information for a given time zone and meta zone.

Link to this section Callbacks

Link to this callback

resolve(zone_name, meta_zone, opts)

View Source
@callback resolve(
  zone_name :: Calendar.time_zone(),
  meta_zone :: String.t(),
  opts :: Keyword.t()
) :: {:ok, Cldr.TimeZoneName.Info.t()} | {:error, term()}

Fetches information for a given time zone and meta zone.

arguments

Arguments

  • zone_name is an Olson time zone name (e.g. "America/Chicago").
  • meta_zone ts the meta zone type for the time zone (e.g. "America_Central").
  • opts is a keyword list of options.

options

Options

  • :locale is any locale or locale name validated by Cldr.validate_locale/2. The default is Cldr.get_locale() which returns the locale set for the current process