No description
Find a file
2022-09-23 14:37:23 +02:00
.gitignore upate readme; bump patch; remove sorting; remove output and input files 2022-09-19 16:30:59 +02:00
index.js refactor: extension case insensitivity 2022-09-23 13:03:52 +02:00
package-lock.json 0.2.3 2022-09-23 14:37:23 +02:00
package.json 0.2.3 2022-09-23 14:37:23 +02:00
README.md docs: description of the project 2022-09-22 15:43:33 +02:00

Generate Timezone JSON

npm npm npm github

This is a node package which allows the generation of a JSON file containing time zones information. You could provide it your own zone.tab file, in which case it will parse the file to generate the JSON. If not given any input, it will pull the latest official time zones for you.

Installation

Run npm i generate-timezone-json to install in your current node project

or install globally with npm i -g generate-timezone-json

Usage

  1. Run: npx generate-timezone-json to generate timezones.json from official IANA Database,
    • this will generate a file named "timezones.json" with data coming from the official IANA database
  2. Run: npx generate-timezone-json <filename> to generate timezones.json from a TAB file,
    • for example, using a file named "zone.tab": generate-timezone-json zone.tab

If installed globally, the npx is optional.

Important Note: the structure of the generated JSON file will be different depending on the source (i.e, zone.tab or the IANA timezones database)

Planned features (not yet implemented)

  1. Specify an output directory with option --outDir: generate-timezone <filename> --outDir <directory>
  2. Uniform JSON structure for all sources
  3. type definitions