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

dacoto/timezone.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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