View Source Cldr.Timezone (Cldr v2.40.0)
Functions to map between the CLDR short time zone code and the IANA timezone names.
The Unicode locale extension U allows the specification of the time zone requested for the provided locale.
This short timezone codes never change even if the IANA names change over time. Therefore these short codes are always stable between CLDR releases.
Summary
Functions
Returns a :{:ok, list}
where list is a
list of IANA timezone names for
a given CLDR short zone code. If no such
short code exists then :error
is returned.
Returns a list of IANA time zone names for
a given CLDR short zone code, or nil
Returns a mapping of CLDR short zone codes to IANA timezone names.
Returns a mapping of territories to their known IANA timezone names.
Functions
Returns a :{:ok, list}
where list is a
list of IANA timezone names for
a given CLDR short zone code. If no such
short code exists then :error
is returned.
Example
iex> Cldr.Timezone.fetch("ausyd")
{:ok,
["Australia/Sydney", "Australia/ACT", "Australia/Canberra", "Australia/NSW"]}
iex> Cldr.Timezone.fetch("nope")
:error
Returns a list of IANA time zone names for
a given CLDR short zone code, or nil
Examples
iex> Cldr.Timezone.fetch("ausyd")
["Australia/Sydney", "Australia/ACT", "Australia/Canberra", "Australia/NSW"]}
iex> Cldr.Timezone.fetch("nope")
nil
Returns a mapping of CLDR short zone codes to IANA timezone names.
@spec timezones_for_territory() :: %{ BS: [String.t(), ...], ZM: [String.t(), ...], GT: [String.t(), ...], AS: [String.t(), ...], GB: [String.t(), ...], FO: [String.t(), ...], HU: [String.t(), ...], BG: [String.t(), ...], SC: [String.t(), ...], GY: [String.t(), ...], CM: [String.t(), ...], ME: [String.t(), ...], QA: [String.t(), ...], IT: [String.t(), ...], TD: [String.t(), ...], IN: [String.t(), ...], PG: [String.t(), ...], CV: [String.t(), ...], VG: [String.t(), ...], DZ: [String.t(), ...], MZ: [String.t(), ...], KN: [String.t(), ...], MW: [String.t(), ...], MO: [String.t(), ...], NZ: [String.t(), ...], NF: [String.t(), ...], MC: [String.t(), ...], CK: [String.t(), ...], GW: [String.t(), ...], DO: [String.t(), ...], LR: [String.t(), ...], AU: [String.t(), ...], GH: [String.t(), ...], AZ: [String.t(), ...], PT: [String.t(), ...], IR: [String.t(), ...], MU: [String.t(), ...], BM: [String.t(), ...], CG: [String.t(), ...], LU: [String.t(), ...], JO: [String.t(), ...], RW: [String.t(), ...], SA: [String.t(), ...], AQ: [String.t(), ...], KZ: [String.t(), ...], CH: [String.t(), ...], KP: [String.t(), ...], SJ: [String.t(), ...], LB: [String.t(), ...], GN: [String.t(), ...], BE: [String.t(), ...], SL: [String.t(), ...], KM: [String.t(), ...], ZW: [String.t(), ...], FJ: [String.t(), ...], AI: [String.t(), ...], CY: [String.t(), ...], MR: [String.t(), ...], PR: [String.t(), ...], TM: [String.t(), ...], BB: [String.t(), ...], DE: [String.t(), ...], IS: [String.t(), ...], GE: [String.t(), ...], TW: [String.t(), ...], MQ: [String.t(), ...], SV: [String.t(), ...], CD: [String.t(), ...], DJ: [String.t(), ...], SK: [String.t(), ...], MS: [String.t(), ...], PW: [String.t(), ...], UG: [String.t(), ...], GL: [String.t(), ...], BN: [String.t(), ...], GS: [String.t(), ...], TF: [String.t(), ...], PK: [String.t(), ...], VI: [String.t(), ...], SG: [String.t(), ...], CW: [String.t(), ...], PN: [String.t(), ...], GM: [String.t(), ...], MA: [String.t(), ...], SE: [String.t(), ...], HN: [String.t(), ...], NA: [String.t(), ...], BH: [String.t(), ...], SN: [String.t(), ...], CA: [String.t(), ...], EE: [String.t(), ...], AM: [String.t(), ...], CN: [String.t(), ...], SO: [String.t(), ...], MV: [String.t(), ...], SR: [String.t(), ...], BA: [String.t(), ...], AD: [String.t(), ...], BO: [String.t(), ...], LC: [String.t(), ...], MD: [String.t(), ...], US: [String.t(), ...], KR: [String.t(), ...], RU: [String.t(), ...], PH: [String.t(), ...], EG: [String.t(), ...], TT: [String.t(), ...], ES: [String.t(), ...], NR: [String.t(), ...], TK: [String.t(), ...], SY: [String.t(), ...], MN: [String.t(), ...], HR: [String.t(), ...], SD: [String.t(), ...], RE: [String.t(), ...], BR: [String.t(), ...], LS: [String.t(), ...], BW: [String.t(), ...], KI: [String.t(), ...], VU: [String.t(), ...], EC: [String.t(), ...], BF: [String.t(), ...], UA: [String.t(), ...], CI: [String.t(), ...], GP: [String.t(), ...], TN: [String.t(), ...], VE: [String.t(), ...], RS: [String.t(), ...], GF: [String.t(), ...], TO: [String.t(), ...], WS: [String.t(), ...], GU: [String.t(), ...], SZ: [String.t(), ...], VN: [String.t(), ...], CL: [String.t(), ...], BI: [String.t(), ...], TG: [String.t(), ...], YT: [String.t(), ...], LA: [String.t(), ...], VA: [String.t(), ...], LT: [String.t(), ...], SI: [String.t(), ...], GR: [String.t(), ...], UZ: [String.t(), ...], LY: [String.t(), ...], PM: [String.t(), ...], CC: [String.t(), ...], PE: [String.t(), ...], TC: [String.t(), ...], CU: [String.t(), ...], LK: [String.t(), ...], NO: [String.t(), ...], JM: [String.t(), ...], NI: [String.t(), ...], FR: [String.t(), ...], BD: [String.t(), ...], ST: [String.t(), ...], AW: [String.t(), ...], MG: [String.t(), ...], UY: [String.t(), ...], SM: [String.t(), ...], IQ: [String.t(), ...], SH: [String.t(), ...], CR: [String.t(), ...], PY: [String.t(), ...], TJ: [String.t(), ...], TH: [String.t(), ...], MP: [String.t(), ...], AT: [String.t(), ...], MM: [String.t(), ...], UN: [String.t(), ...], TR: [String.t(), ...], BZ: [String.t(), ...], EH: [String.t(), ...], ET: [String.t(), ...], OM: [String.t(), ...], NU: [String.t(), ...], AO: [String.t(), ...], WF: [String.t(), ...], CF: [String.t(), ...], MY: [String.t(), ...], SX: [String.t(), ...], CO: [String.t(), ...], AR: [String.t(), ...], TL: [String.t(), ...], TV: [String.t(), ...], HK: [String.t(), ...], MT: [String.t(), ...], KG: [String.t(), ...], RO: [String.t(), ...], YE: [String.t(), ...], FK: [String.t(), ...], NL: [String.t(), ...], MH: [String.t(), ...], LV: [String.t(), ...], KY: [String.t(), ...], CZ: [String.t(), ...], DK: [String.t(), ...], BT: [String.t(), ...], CX: [String.t(), ...], NP: [String.t(), ...], ID: [String.t(), ...], BJ: [String.t(), ...], PS: [String.t(), ...], AE: [String.t(), ...], IM: [String.t(), ...], SB: [String.t(), ...], KE: [String.t(), ...], GA: [String.t(), ...], SS: [String.t(), ...], LI: [String.t(), ...], KW: [String.t(), ...], ER: [String.t(), ...], BQ: [String.t(), ...], FI: [String.t(), ...], ZA: [String.t(), ...], VC: [String.t(), ...], MX: [String.t(), ...], AG: [String.t(), ...], IO: [String.t(), ...], AL: [String.t(), ...], GG: [String.t(), ...], AF: [String.t(), ...], PA: [String.t(), ...], NG: [String.t(), ...], NE: [String.t(), ...], NC: [String.t(), ...], JP: [String.t(), ...], UM: [String.t(), ...], HT: [String.t(), ...], GD: [String.t(), ...], GQ: [String.t(), ...], FM: [String.t(), ...], TZ: [String.t(), ...], BY: [String.t(), ...], PF: [String.t(), ...], MK: [String.t(), ...], DM: [String.t(), ...], JE: [String.t(), ...], IE: [String.t(), ...], PL: [String.t(), ...], ML: [String.t(), ...], GI: [String.t(), ...], KH: [String.t(), ...] }
Returns a mapping of territories to their known IANA timezone names.