timezones
Every JavaScript time zone, plus a random one.
Based on this StackOverflow Question
Usage
ESM only, types included: the same import works in Node.js, Bun and browsers.
import {
randomTimeZone,
timeZones,
} from "@ultirequiem/timezones";
console.log(`My timezone is ${randomTimeZone()}.`);
const date = new Date();
for (const timeZone of timeZones) {
console.log(timeZone, date.toLocaleString("en-US", { timeZone }));
}
Documentation
For more examples checkout Timero and the CLI Tool.
Support
Open an Issue, I will check it as soon as possible π
If you want to hurry me up a bit send me a tweet π
Donβt forget to star the repo β
Notes
This was done mainly because Timero.
Authors
Eliaz Bobadilla - Creator and Maintainer πͺ
See also the full list of contributors who participated in this project β¨
Versioning
We use Semantic Versioning. For the versions available, see the tags π·οΈ
Licence
Licensed under the MIT License π