0.1.0 • Published 6 years ago

us-timezones-name v0.1.0

Weekly downloads
65
License
ISC
Repository
github
Last release
6 years ago

us-timezone-names

Library to get us timezone details. Functions accept timezone names and abbreviations

Functions

getTimeZoneByName

Get timezone info object by timezone name.

 import tz from 'us-timezones-name';

 tz.getTimeZoneByName( 'Pacific Standard Time' );
 // Returns
 {
   Abbreviation: 'PST',  //Abbreviation for the timezone
   Name: 'Pacific Standard Time',  //Standard Name
   DisplayName: 'Pacific Standard Time(UTC - 8)',  //Display String
   Offset: '-8 hours' //Offset string
 }

getTimeZoneByAbbreviation

Get timezone info object by timezone abbreviation.

 tz.getTimeZoneByAbbreviation( 'PST' );
 // Returns
 {
   Abbreviation: 'PST',  //Abbreviation for the timezone
   Name: 'Pacific Standard Time',  //Standard Name
   DisplayName: 'Pacific Standard Time(UTC - 8)',  //Display String
   Offset: '-8 hours' //Offset string
 }

getAll

Get all timezones objects.

 tz.getAll();
 // Returns  Array of timezone objects
 [
 {
   Abbreviation: 'PST',  //Abbreviation for the timezone
   Name: 'Pacific Standard Time',  //Standard Name
   DisplayName: 'Pacific Standard Time(UTC - 8)',  //Display String
   Offset: '-8 hours' //Offset string
 },
 .
 .
 ]
0.1.0

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

7 years ago