1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-28 10:09:20 -05:00
denoland-deno/tests/specs/run/unstable_temporal_api_patch/main.ts
Kenta Moriuchi e522f4b65a
BREAKING(temporal/unstable): Remove obsoleted Temporal APIs part 2 (#25505)
Mainly I removed `Temporal.Calendar` and `Temporal.TimeZone` and
replaced them to APIs that handle calendar and timezone as strings.
https://github.com/tc39/proposal-temporal/pull/2925

Related #24836
2024-09-10 21:36:43 +00:00

11 lines
361 B
TypeScript

console.log(Temporal.Now.timeZoneId());
// @ts-expect-error: undefined check
console.log(Temporal.Now.timeZone);
const zoned = new Temporal.ZonedDateTime(0n, "UTC");
console.log(zoned.calendarId);
console.log(zoned.timeZoneId);
// @ts-expect-error: undefined check
console.log(zoned.calendar);
// @ts-expect-error: undefined check
console.log(zoned.timeZone);