-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from burhanahmeed/v2.0.1-add-daylightsaving
V2.0.1 add daylightsaving
- Loading branch information
Showing
8 changed files
with
2,750 additions
and
1,061 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,28 @@ | ||
import { Time, timezone } from "https://denopkg.com/burhanahmeed/time.ts@v1.0.0/mod.ts"; | ||
import { time } from "../mod.ts"; | ||
|
||
console.log('Jakarta Timezone: ', new Time().timezone('Asia/Jakarta')) | ||
console.log('Singapore Timezone: ', new Time().timezone('Asia/Singapore')) | ||
console.log('Time now UTC: ',time().t) | ||
//Time now UTC: 2020-06-14T06:19:37.483Z | ||
|
||
console.log('Jakarta Timezone: ', new Time('2020-06-06 14:33:12').timezone('Asia/Jakarta')) | ||
console.log('Singapore Timezone: ', new Time('2020-06-06 14:33:12').timezone('Asia/Singapore')) | ||
console.log('Time now Singapore: ',time().tz('asia/singapore').t) | ||
//Time now Singapore: 2020-06-14T14:19:37.483Z | ||
|
||
console.log('UTC timezone: ', new Time().utc) | ||
console.log('Now timezone: ', new Time().now) | ||
console.log('Time now New York: ',time().tz('America/New_york').t) | ||
//Time now New York: 2020-06-14T01:19:37.484Z | ||
|
||
console.log(timezone) | ||
console.log('Time now Jakarta: ',time().tz('asia/Jakarta').t) | ||
//Time now Jakarta: 2020-06-14T13:19:37.484Z | ||
|
||
console.log('Time now UTC string: ',time().toString()) | ||
//Time now UTC string: Sun, 14 Jun 2020 06:21:21 GMT | ||
|
||
console.log('Time now UTC: ',time('2020-06-09 09:19').t) | ||
//Time now UTC: 2020-06-09T02:19:00.000Z | ||
|
||
console.log('Time now Singapore: ',time('2020-06-09 09:19').tz('asia/singapore').t) | ||
//Time now Singapore: 2020-06-09T10:19:00.000Z | ||
|
||
console.log('Time now UTC another way: ',time().tz('utc').t) | ||
//Time now UTC another way: 2020-06-14T06:34:19.344Z | ||
|
||
console.log('Time now of your server timezone: ',time().now()) | ||
//Time now of your server timezone: 2020-06-14T13:35:17.927Z |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.