Skip to content

Simple array of timezones with their long name, tz code, and UTC offset.

License

Notifications You must be signed in to change notification settings

StrangerGithuber/compact-timezone-list

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

compact-timezone-list

This package contains an array of timezones based on conventional options found online. It does not follow any complete data set, but all names are according to the tz format: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

More specifically, the fields in the array are:

  • offset, a string from "-11:00" to "+14:00" representing the UTC offset
  • label, a readable label that contains the offset and a longer, descriptive name of the timezone
  • tzCode, the value from the tz standard

Install

npm install compact-timezone-list --save
# or
yarn add compact-timezone-list

Example:

 import timezones from 'compact-timezone-list';
 // or
 import { defaultTimezoneSet, minimalTimezoneSet } from 'compact-timezone-list';

Compatible

It is compatible with the select2 package: https://select2.org/

Last tested at 2023.07.25 .

Details

  • The default export provides a long list of options, with multiple suggestions for each UTC offset.
  • The minimalTimezoneSet export provides one option per offset type, with a favourite chosen to represent each offset. This is mostly targeted to small, western-focused apps. But, every UTC offset is included.

Contribution:

If you think that you are able to contribute in the development then don't hesitate join to us. All donations will be split between contributors. Firt 5 contributors will get the money plus mentioning in the credits section and others will be mentioned in the credits.

Donation possibilities:

Type Link
Buy me a coffee "Buy Me A Coffee"
Coinbase "Donate with crypto"
Ko-fi "Ko-fi"
Patreon "Patreon"

About

Simple array of timezones with their long name, tz code, and UTC offset.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%