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.
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
locale
is any language tag returned byMyApp.Cldr.Locale.new/1
or a locale name in the list returned byMyApp.Cldr.known_locale_names/0
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"