diff options
author | Linus Groh <mail@linusgroh.de> | 2021-08-01 17:55:06 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-08-01 20:31:31 +0100 |
commit | fa0d6d1045bf8bd59be0c45541349846c64b5f8e (patch) | |
tree | 12e4fa240e7b03a06bffbdebea4fec0388a6614a /Userland | |
parent | 14e7eff43f671f4a899c922f73adaa665b2eb559 (diff) | |
download | serenity-fa0d6d1045bf8bd59be0c45541349846c64b5f8e.zip |
LibJS: Handle ZonedDateTime in GetTemporalCalendarWithISODefault
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp index b35e69c3ca..934a38415c 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp @@ -369,7 +369,9 @@ Object* get_temporal_calendar_with_iso_default(GlobalObject& global_object, Obje return &static_cast<PlainDateTime&>(item).calendar(); if (is<PlainTime>(item)) return &static_cast<PlainTime&>(item).calendar(); - // TODO: The rest of the Temporal built-ins (PlainMonthDay, PlainYearMonth, ZonedDateTime) + if (is<ZonedDateTime>(item)) + return &static_cast<ZonedDateTime&>(item).calendar(); + // TODO: The rest of the Temporal built-ins (PlainMonthDay, PlainYearMonth) // 2. Let calendar be ? Get(item, "calendar"). auto calendar = item.get(vm.names.calendar); |