id = Temporal.Now.timeZoneId();
now = Temporal.Now.instant();
tz = Temporal.TimeZone.from(id);
nextTransition = tz.getNextTransition(now);
before = tz.getOffsetStringFor(nextTransition.subtract({ nanoseconds: 1 }));
after = tz.getOffsetStringFor(nextTransition.add({ nanoseconds: 1 }));
console.log(
`At ${nextTransition.toZonedDateTimeISO(
id
)} the offset will change from UTC ${before} to ${after}`
);
Error
error: Uncaught (in promise) TypeError: Temporal.Now.timeZoneId is not a function
id = Temporal.Now.timeZoneId();
^
at file:///C:/Users/Nogr/Personal%20Projects/Web/temporal-api/3_timeZoneId.js:1:19
Version: Deno 1.40.2
Problem
Temporal.Now.timeZoneId();
is not a function. Spec: https://tc39.es/proposal-temporal/docs/now.html#timeZoneIdExample Code
Error