Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michael-spengler/time
🦕 module for location based timezone provisioning etc. - alpha test phase.
https://github.com/michael-spengler/time
timezone timezone-list
Last synced: 26 days ago
JSON representation
🦕 module for location based timezone provisioning etc. - alpha test phase.
- Host: GitHub
- URL: https://github.com/michael-spengler/time
- Owner: michael-spengler
- Created: 2020-08-17T11:58:00.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-06T17:01:54.000Z (about 3 years ago)
- Last Synced: 2024-09-16T17:11:56.012Z (about 2 months ago)
- Topics: timezone, timezone-list
- Language: TypeScript
- Homepage:
- Size: 230 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Time
Fortunately there is [ICU support](https://github.com/denoland/deno/issues/1968) since [Deno v1.8](https://deno.com/blog/v1.8#icu-support) came out.
So this module will evolve in providing different time related services in the future.Contributions are welcome.
## Usage Example
```sh
deno run --allow-read --allow-net https://deno.land/x/time/usage-example.ts
```
```ts
import * as log from "https://deno.land/std/log/mod.ts"
import { TimeService } from "https://deno.land/x/time/mod.ts"const countryCode = "DE";
const cityName = "Heidelberg";const timeZone = await TimeService.getTimeZone(countryCode, cityName)
log.info(`The timezone of ${cityName} (${countryCode}) is ${timeZone}`)```
## Test
```sh
deno test --allow-read --allow-net https://deno.land/x/time/test.ts
```## Support my Open Source Contributions
If you like my work please consider downloading the brave browser via my
promotion link: [https://brave.com/fan464](https://brave.com/fan464).![![](https://brave.com/)](https://brave.com/wp-content/uploads/2019/01/logotype-full-color.svg)