timezone-abbreviations
TypeScript icon, indicating that this package has built-in type declarations

1.2.6 • Public • Published

Timezone Abbreviations

JavaScript doesn't provide abbreviations list, and moment.js might be overkill for my project, so I create a package and get the timezone abbreviations data from https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations and extract zone string from moment.js and verified by Intl.DateTimeFormat.

Usage

npm install timezone-abbreviations
import timezones from "timezone-abbreviations";

console.log(
  "timezone",
  ...timezones.filter((item) => item.abbr === "AEST") 
);

// output:
// {
//   abbr: 'AEST',
//   description: 'Australian Eastern Standard Time',
//   offset: 'UTC+10',
//   names: [
//     'Australia/Brisbane',
//     'Australia/Lindeman',
//     'Australia/Queensland'
//   ]
// }

Readme

Keywords

none

Package Sidebar

Install

npm i timezone-abbreviations

Weekly Downloads

359

Version

1.2.6

License

ISC

Unpacked Size

70.7 kB

Total Files

14

Last publish

Collaborators

  • wjl_npm