1.0.0 • Published 7 years ago
get-zonetab v1.0.0
get-zonetab
A Node module to get the latest zone.tab file form IANA Time Zone Database
const getZonetab = require('get-zonetab');
getZonetab().then(string => {
string; //=> '# tz zone descriptions (deprecated version)\n ...'
});Installation
npm install get-zonetabAPI
const getZonetab = require('get-zonetab');getZonetab(options)
options: Object
Return: Promise instance
It gets and extracts zone.tab file form https://www.iana.org/time-zones and returns a promise for a string of file contents.
Options
All options except for encoding will be directly used as Request options.
options.encoding
Type: String or null
Default: utf8
Determine the encoding of the stirng or get a Buffer instead if this option is null.
getZonetab({encoding: null}).then(buffer => {
buffer; //=> <Buffer 23 20 74 7a 20 7a 6f 6e 65 20 64 65 73 63 72 ... >
});License
Copyright (c) 2016 Shinnosuke Watanabe
Licensed under the MIT License.