UNPKG

@barchart/common-js

Version:
33 lines (32 loc) 712 B
/** * Utilities for working with timezones. * * @public * @module lang/timezone */ /** * Gets a list of names in the tz database (see https://en.wikipedia.org/wiki/Tz_database * and https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). * * @public * @static * @returns {string[]} */ export function getTimezones(): string[]; /** * Indicates if a timezone name exists. * * @public * @static * @param {string} name - The timezone name to find. * @returns {boolean} */ export function hasTimezone(name: string): boolean; /** * Attempts to guess the timezone of the current computer. * * @public * @static * @returns {string|null} */ export function guessTimezone(): string | null;