Giter Club home page Giter Club logo

tz's Introduction

tz

Time zone information in friendly JSON for use cases like server-side validation, user input options, etc.

This package doesn't contain any historical data and should not be used for working with specific dates. Take a look at other packages for that, such as pytz, moment-timezone, etc.

The data is taken directly from IANA time zone database (version 2020a).

  • /dist/tz.json contains time zones sorted by canonical name.
  • /dist/tz-country.json contains time zones sorted by country. With extra "Other" country for time zones that aren't assigned to any country ("Etc/GMT", "CST6CDT", etc.).

Please open an issue or a pull request if you spot any inaccuracy.

format

{
  "canonical": "Pacific/Auckland",  // primary time zone name currently in use
  "dst": true,                      // tells whether time zone observes daylight saving time at all (either now or in future)
  "abbr_st": "NZST",                // abbreviation for standard time
  "abbr_dst": "NZDT",               // abbreviation for daylight saving time
  "offset_st": 43200,               // offset from UTC (in seconds) for standard time
  "offset_dst": 3600,               // offset from offset_st (in seconds) for daylight saving time
  "aliases": [                      // collection of backward-compatible time zone names
    "Antarctica/McMurdo",
    "Antarctica/South_Pole",
    "NZ"
  ],
  "countries": [                    // collection of ISO 3166 countries where this time zone is observed
    {
      "code": "AQ",
      "name": "Antarctica"
    },
    {
      "code": "NZ",
      "name": "New Zealand"
    }
  ]
}

running

To run this code and generate output files, do it in sequence as below.

  1. npm run normalize
  2. npm run generate

todo

  • add full name for each zone abbreviation
    • CET → Central European Time
    • CEST → Central European Summer Time
    • IST → India Standard Time
    • IST → Irish Standard Time
    • IST → Israel Standard Time
    • etc.
  • parse and nicely present coordinates from zone1970.tab
  • take population counts from moment-timezone

tz's People

Contributors

dominikserafin avatar

Stargazers

 avatar

Watchers

 avatar  avatar

tz's Issues

Enboard

Hi Dominik,
sorry to bother you via this way.

I just saw that you discontinued Enboard, although it looked quite promising.

Have you considered releasing it as OpenSource ? Maybe somebody is willing to pick up the development.

Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.