README
get-tz-ids
A Node module to get an array of time zone IDs form IANA Time Zone Database
const getTzIds = require('get-tz-ids');
getTzIds().then(ids => {
ids; //=> ['Africa/Abidjan', 'Africa/Accra', 'Africa/Addis_Ababa', 'Africa/Algiers', ...]
});
Installation
npm install get-tz-ids
API
const getTzIds = require('get-tz-ids');
getTzIds([options])
options: Object
(directly passed to Request
)
Return: Promise
It fetches and parses the latest zone.tab
file form https://www.iana.org/time-zones and returns a promise for an array of alphabetically sorted time zone IDs.
Related project
- get-tz - Get all time zone info instead of IDs only
License
Copyright (c) 2016 Shinnosuke Watanabe
Licensed under the MIT License.