Skip to content
This repository was archived by the owner on Dec 24, 2021. It is now read-only.

Latest commit

 

History

History
53 lines (38 loc) · 1.28 KB

readme.md

File metadata and controls

53 lines (38 loc) · 1.28 KB

Total Downloads Latest Stable Version License Last commit

Timezone.js

A library to obtain the list of time zones.

Installation

// npm install
npm install @dacoto/timezone.js

// yarn install
npm add @dacoto/timezone.js

Usage

Include
    import Timezone from '@dacoto/timezone.js';

or

    <script src="dist/timezone.js"></script>
Use in javascript
  • List time zones
    Timezone.getAll(); // {"Pacific/Niue":"(GMT-11:00) Niue","Pacific/Pago_Pago":"(GMT-11:00 ...
  • Get time zone name
    Timezone.getTimezone('Europe/Madrid'); // (GMT+01:00) Madrid

License

MIT