agomusa / timezones

πŸ•’ A list with all possible timezone, works on Deno/Browser/Node.js

Home Page:https://deno.land/x/timezones

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

timezones

Possibles timezones

Usage

Deno/Browser:

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

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

const date = new Date();

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

In Node.js you have the same API:

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

Note

Done mainly because Timero.

License

This project is licensed under the MIT License.

About

πŸ•’ A list with all possible timezone, works on Deno/Browser/Node.js

https://deno.land/x/timezones

License:Other


Languages

Language:JavaScript 92.8%Language:TypeScript 7.2%