MyApp.Cldr.Locale.timezone_from_locale

You're seeing just the function timezone_from_locale, go back to MyApp.Cldr.Locale module for more information.
Link to this function

timezone_from_locale(locale)

View Source (since 2.19.0)

Specs

timezone_from_locale(Cldr.LanguageTag.t() | Cldr.Locale.locale_name()) ::
  String.t() | {:error, {module(), String.t()}}

Returns the time zone from a language tag or locale name.

Arguments

Returns

  • A time zone ID as a string or

  • :error if no time zone can be determined

Examples

iex> MyApp.Cldr.Locale.timezone_from_locale "en-US-u-tz-ausyd"
"Australia/Sydney"