Socket
Socket
Sign inDemoInstall

get-tz

Package Overview
Dependencies
63
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    get-tz

Get time zone data from IANA time zone database


Version published
Weekly downloads
58
increased by93.33%
Maintainers
1
Install size
703 kB
Created
Weekly downloads
 

Readme

Source

get-tz

NPM version Build Status Coverage Status Dependency Status devDependency Status

A Node module to get time zone data form IANA Time Zone Database

const getTz = require('get-tz');

getTz().then(rows => {
  rows; /* => [
    {
      countryCode: 'AD',
      coordinate: {
        latitude: {sign: '+', degree: 42, minute: 30},
        longitude: {sign: '+', degree: 1, minute: 31}
      },
      id: 'Europe/Andorra'
    },
    {
      countryCode: 'AE',
      coordinate: {
        latitude: {sign: '+', degree: 25, minute: 18},
        longitude: {sign: '+', degree: 55, minute: 18}
      }
      id: 'Asia/Dubai'
    },
    ...
  ] */  
})

Installation

Use npm.

npm install get-tz

API

const getTz = require('get-tz');

getTz([options])

options: Object (directly passed to Request)
Return: Promise

It gets the latest zone.tab file form https://www.iana.org/time-zones and returns a promise for an array of parsed TSV data.

License

Copyright (c) 2016 Shinnosuke Watanabe

Licensed under the MIT License.

Keywords

FAQs

Last updated on 15 Jun 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc