get-tz-ids

1.0.0 • Public • Published

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.

Package Sidebar

Install

npm i get-tz-ids

Weekly Downloads

9

Version

1.0.0

License

MIT

Last publish

Collaborators

  • shinnn