Skip to main content
Deno 2 is finally here πŸŽ‰οΈ
Learn more

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.