summaryrefslogtreecommitdiff
path: root/tests/specs/run/unstable_temporal_api_patch/main.ts
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2024-09-11 06:36:43 +0900
committerGitHub <noreply@github.com>2024-09-10 21:36:43 +0000
commite522f4b65a3439030506733b104498f21422ede0 (patch)
treefdc344f8c28aefe387d5c8048e01d0a2240bc8e5 /tests/specs/run/unstable_temporal_api_patch/main.ts
parenta69b1e699ef76568a4a3da47939134abda545ec7 (diff)
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
Diffstat (limited to 'tests/specs/run/unstable_temporal_api_patch/main.ts')
-rw-r--r--tests/specs/run/unstable_temporal_api_patch/main.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/specs/run/unstable_temporal_api_patch/main.ts b/tests/specs/run/unstable_temporal_api_patch/main.ts
new file mode 100644
index 000000000..6a4078053
--- /dev/null
+++ b/tests/specs/run/unstable_temporal_api_patch/main.ts
@@ -0,0 +1,11 @@
+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);