View Source Cldr.Timezone (Cldr v2.40.1)
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() :: %{ EG: [String.t(), ...], CV: [String.t(), ...], BN: [String.t(), ...], GN: [String.t(), ...], PS: [String.t(), ...], CG: [String.t(), ...], TV: [String.t(), ...], AE: [String.t(), ...], LY: [String.t(), ...], ER: [String.t(), ...], NC: [String.t(), ...], ET: [String.t(), ...], IT: [String.t(), ...], EE: [String.t(), ...], SD: [String.t(), ...], ZW: [String.t(), ...], CU: [String.t(), ...], KH: [String.t(), ...], GS: [String.t(), ...], CD: [String.t(), ...], RW: [String.t(), ...], KY: [String.t(), ...], MY: [String.t(), ...], BJ: [String.t(), ...], GD: [String.t(), ...], SS: [String.t(), ...], LS: [String.t(), ...], UY: [String.t(), ...], CX: [String.t(), ...], BW: [String.t(), ...], BR: [String.t(), ...], GW: [String.t(), ...], RO: [String.t(), ...], TT: [String.t(), ...], GM: [String.t(), ...], FM: [String.t(), ...], SY: [String.t(), ...], BB: [String.t(), ...], JE: [String.t(), ...], BD: [String.t(), ...], CY: [String.t(), ...], CC: [String.t(), ...], SI: [String.t(), ...], SX: [String.t(), ...], JO: [String.t(), ...], BA: [String.t(), ...], BH: [String.t(), ...], WS: [String.t(), ...], BS: [String.t(), ...], ID: [String.t(), ...], QA: [String.t(), ...], FR: [String.t(), ...], PR: [String.t(), ...], GA: [String.t(), ...], VU: [String.t(), ...], YT: [String.t(), ...], UN: [String.t(), ...], MS: [String.t(), ...], MH: [String.t(), ...], DJ: [String.t(), ...], GH: [String.t(), ...], DZ: [String.t(), ...], GQ: [String.t(), ...], UG: [String.t(), ...], UZ: [String.t(), ...], ZM: [String.t(), ...], KG: [String.t(), ...], TO: [String.t(), ...], KZ: [String.t(), ...], KW: [String.t(), ...], GI: [String.t(), ...], AS: [String.t(), ...], UM: [String.t(), ...], MC: [String.t(), ...], CW: [String.t(), ...], NI: [String.t(), ...], NA: [String.t(), ...], LI: [String.t(), ...], MO: [String.t(), ...], GB: [String.t(), ...], RE: [String.t(), ...], AF: [String.t(), ...], LK: [String.t(), ...], AD: [String.t(), ...], ML: [String.t(), ...], SZ: [String.t(), ...], KI: [String.t(), ...], CO: [String.t(), ...], CN: [String.t(), ...], SC: [String.t(), ...], ES: [String.t(), ...], AL: [String.t(), ...], GE: [String.t(), ...], LV: [String.t(), ...], NE: [String.t(), ...], GL: [String.t(), ...], TW: [String.t(), ...], EH: [String.t(), ...], SJ: [String.t(), ...], CR: [String.t(), ...], BM: [String.t(), ...], LU: [String.t(), ...], DK: [String.t(), ...], TH: [String.t(), ...], KP: [String.t(), ...], NZ: [String.t(), ...], JP: [String.t(), ...], BF: [String.t(), ...], VE: [String.t(), ...], SG: [String.t(), ...], TN: [String.t(), ...], TG: [String.t(), ...], HK: [String.t(), ...], MR: [String.t(), ...], UA: [String.t(), ...], PE: [String.t(), ...], VN: [String.t(), ...], AZ: [String.t(), ...], FK: [String.t(), ...], DE: [String.t(), ...], CZ: [String.t(), ...], VC: [String.t(), ...], CA: [String.t(), ...], NL: [String.t(), ...], BQ: [String.t(), ...], PH: [String.t(), ...], BE: [String.t(), ...], GP: [String.t(), ...], CF: [String.t(), ...], FO: [String.t(), ...], WF: [String.t(), ...], IR: [String.t(), ...], PT: [String.t(), ...], AO: [String.t(), ...], HT: [String.t(), ...], US: [String.t(), ...], NF: [String.t(), ...], SV: [String.t(), ...], GR: [String.t(), ...], PL: [String.t(), ...], TL: [String.t(), ...], BT: [String.t(), ...], AI: [String.t(), ...], HR: [String.t(), ...], LA: [String.t(), ...], SO: [String.t(), ...], SA: [String.t(), ...], TZ: [String.t(), ...], AU: [String.t(), ...], KN: [String.t(), ...], LT: [String.t(), ...], GY: [String.t(), ...], MN: [String.t(), ...], TD: [String.t(), ...], AT: [String.t(), ...], SH: [String.t(), ...], IQ: [String.t(), ...], PM: [String.t(), ...], SM: [String.t(), ...], HN: [String.t(), ...], VI: [String.t(), ...], MU: [String.t(), ...], MM: [String.t(), ...], MD: [String.t(), ...], NP: [String.t(), ...], NR: [String.t(), ...], ME: [String.t(), ...], GG: [String.t(), ...], AG: [String.t(), ...], GF: [String.t(), ...], TR: [String.t(), ...], SK: [String.t(), ...], BZ: [String.t(), ...], MV: [String.t(), ...], DO: [String.t(), ...], PK: [String.t(), ...], AM: [String.t(), ...], PG: [String.t(), ...], OM: [String.t(), ...], GU: [String.t(), ...], AW: [String.t(), ...], ST: [String.t(), ...], SR: [String.t(), ...], SE: [String.t(), ...], NG: [String.t(), ...], LR: [String.t(), ...], IE: [String.t(), ...], RS: [String.t(), ...], VG: [String.t(), ...], FI: [String.t(), ...], CK: [String.t(), ...], MG: [String.t(), ...], TC: [String.t(), ...], PF: [String.t(), ...], KR: [String.t(), ...], BG: [String.t(), ...], JM: [String.t(), ...], BO: [String.t(), ...], AR: [String.t(), ...], VA: [String.t(), ...], TK: [String.t(), ...], CH: [String.t(), ...], TF: [String.t(), ...], LB: [String.t(), ...], SB: [String.t(), ...], MZ: [String.t(), ...], MQ: [String.t(), ...], PN: [String.t(), ...], IM: [String.t(), ...], IN: [String.t(), ...], CI: [String.t(), ...], BY: [String.t(), ...], SN: [String.t(), ...], MP: [String.t(), ...], DM: [String.t(), ...], PW: [String.t(), ...], EC: [String.t(), ...], YE: [String.t(), ...], MA: [String.t(), ...], FJ: [String.t(), ...], KM: [String.t(), ...], TJ: [String.t(), ...], GT: [String.t(), ...], TM: [String.t(), ...], CL: [String.t(), ...], MK: [String.t(), ...], SL: [String.t(), ...], MX: [String.t(), ...], ZA: [String.t(), ...], NU: [String.t(), ...], IO: [String.t(), ...], KE: [String.t(), ...], BI: [String.t(), ...], AQ: [String.t(), ...], RU: [String.t(), ...], NO: [String.t(), ...], PA: [String.t(), ...], CM: [String.t(), ...], PY: [String.t(), ...], MW: [String.t(), ...], LC: [String.t(), ...], HU: [String.t(), ...], MT: [String.t(), ...], IS: [String.t(), ...] }
Returns a mapping of territories to their known IANA timezone names.