Socket
Socket
Sign inDemoInstall

iana-tz-data

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    iana-tz-data

Npm module for IANA unofficial JSON data


Version published
Weekly downloads
20K
increased by4.69%
Maintainers
1
Install size
2.75 MB
Created
Weekly downloads
 

Readme

Source

IANA Tz Data

Unofficial JSON distribution of zdumped IANA timezone data.

It should be noted that a tabular text file (not JSON) is the "official" format for the IANA timezone data. The JSON data contained in this package is provided as a convenience for the development community, and is programatically generated from the corresponding text files using the JSON conversion utility provided here.

Goals

  • The data in this package is intended to serve as a common reference point for most JavaScript packages.
  • Allow i18n libraries to define IANA timezone data as versioned dependency.

What's not included

No code other than the conversion utility is included.

The official data has additional information and has a different structure than what's distributed here. The official data has Zones and Rules

What's included

A JSON representation of the timezone transitions (actually, the output of zdump -v) for every timezone ids, which is what moment-timezone, globalize, and perhaps other JavaScript library use to calculate a date in a specific timezone ids. The structure looks like the below.

{
  "zoneData": {
    ...
    "America": {
      ...
      "New_York": {
        abbrs: [],
        untils: [],
        offsets: [],
        isdsts: []
      }
      ...
    }
  }
}

Status

Latest official release is version 2019b, published on 2019-07-01.

Usage

Installation using NPM:

npm install --save iana-tz-data

We follow a semver corresponding version based on the official version. The major version corresponds to the year and the minor corresponds to the letter. The patch version is independent and used for any necessary package fixes.

Official versionOur corresponding semver version
2019b2019.1
2018i2018.8
2018g2018.6
2018f2018.5
2018e2018.4
2018d2018.3
2018c2018.2
2018b2018.1
2017c2017.2
2017b2017.1
2017a2017.0

On your application, you can access IANA timezone JSON data by importing the "iana-tz-data" module.

import IANATimezoneData from "iana-tz-data";

License

MIT © Rafael Xavier de Souza

Keywords

FAQs

Last updated on 08 Jul 2019

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