@northguild/gmt
Version:
Date and time library for JavaScript and TypeScript, built on TC39 Temporal: time zones, DST, business days, ISO 8601 strings in and out. Never throws.
12 lines • 473 B
TypeScript
/**
* Return the array of all available IANA timezone identifiers.
*
* - Uses `Intl.supportedValuesOf('timeZone')` to get the full list.
* - Returns `[]` when the API is unavailable (older runtimes).
*
* @returns array of IANA timezone identifier strings, or `[]` on failure
*
* @example getTimeZones() // ["Africa/Abidjan", "Africa/Accra", ...]
* @example getTimeZones().length // ~422 (varies by runtime/ICU)
*/
export declare function getTimeZones(): string[];