Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ericlewis/zip2tz
Simple library for converting a zip code to a timezone string.
https://github.com/ericlewis/zip2tz
convert timezone timezone-conversion zipcode
Last synced: 17 days ago
JSON representation
Simple library for converting a zip code to a timezone string.
- Host: GitHub
- URL: https://github.com/ericlewis/zip2tz
- Owner: ericlewis
- License: mit
- Created: 2021-11-15T17:37:20.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-15T20:35:33.000Z (about 3 years ago)
- Last Synced: 2024-10-16T11:52:26.741Z (2 months ago)
- Topics: convert, timezone, timezone-conversion, zipcode
- Language: JavaScript
- Homepage:
- Size: 530 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zip2tz
Simple library for converting a zipcode to a timezone string.
## Installation
node 14+ supported.### Yarn
```console
yarn add zip2tz
```### NPM
```console
npm install --save zip2tz
```## Usage
```javascript
const { lookup } = require('zip2tz');const tz = lookup('94110');
console.log(tz); // America/Los_Angeles
```## Supported Time Zones
* America/Adak
* America/Anchorage
* America/Boise
* America/Chicago
* America/Denver
* America/Detroit
* America/Indiana/Indianapolis
* America/Indiana/Knox
* America/Indiana/Marengo
* America/Indiana/Petersburg
* America/Indiana/Tell_City
* America/Indiana/Vevay
* America/Indiana/Vincennes
* America/Indiana/Winamac
* America/Juneau
* America/Kentucky/Louisville
* America/Kentucky/Monticello
* America/Los_Angeles
* America/Menominee
* America/Metlakatla
* America/New_York
* America/Nome
* America/North_Dakota/Beulah
* America/North_Dakota/Center
* America/North_Dakota/New_Salem
* America/Phoenix
* America/Puerto_Rico
* America/Sitka
* America/St_Thomas
* America/Yakutat
* Pacific/Chuuk
* Pacific/Guam
* Pacific/Honolulu
* Pacific/Kosrae
* Pacific/Kwajalein
* Pacific/Majuro
* Pacific/Pago_Pago
* Pacific/Palau
* Pacific/Pohnpei
* Pacific/Saipan
* Pacific/Wake## Credit
This project uses data from the [Ziptz project](https://github.com/infused/ziptz).