timezones

A list with all the JavaScript possible timezones.

Based on this StackOverflow Question

Usage

Deno 🚀

import {
  randomTimeZone,
  timeZones,
} from "https://deno.land/x/timezones/mod.ts";

console.log(`My timezone is ${randomTimeZone()}`);

const date = new Date();

timeZones.forEach((timeZone) => {
  console.log(timeZone, date.toLocaleString("en-US", { timeZone }));
});

Node.js 🐢

You have exactly the same API

import { randomTimeZone, timeZone } from "@ultirequiem/timezones";

Browser

Using type module 🍱

Using a plain script tag 👇

Documentation

Autogenerated Documentation 😎

Support

Open an Issue, I will check it a soon as possible 👀

If you want to hurry me up a bit send me a tweet 😆

Consider supporting me on Patreon if you like my work 🚀

Don't forget to start the repo

Notes

This was done mainly because Timero.

Licence

Licensed under the MIT License.