1.0.0 • Published 8 years ago

get-tz-ids v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

get-tz-ids

NPM version Build Status Coverage Status Dependency Status devDependency Status

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

Use npm.

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.