Last active
October 23, 2022 05:31
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
const instant = Temporal.Instant.from('2022-01-01T00:00+00:00') | |
console.log(instant.hour) // returns undefined! | |
const zdtTokyo = instant.toZonedDateTimeISO('Asia/Tokyo') | |
console.log(zdtTokyo.hour) //returns 9 | |
const zdtPrague = instant.toZonedDateTimeISO('Europe/Prague') | |
console.log(zdtPrague.hour) //returns 1 | |
const zdtNewYork = instant.toZonedDateTimeISO('America/New_York') | |
console.log(zdtNewYork.hour) //returns 19 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment