1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:27:34 +00:00

LibJS: Handle PlainTime objects in GetTemporalCalendarWithISODefault

This commit is contained in:
Linus Groh 2021-07-28 19:12:24 +01:00
parent c2d45e5a83
commit 817be1b292

View file

@ -364,7 +364,9 @@ Object* get_temporal_calendar_with_iso_default(GlobalObject& global_object, Obje
return &static_cast<PlainDate&>(item).calendar();
if (is<PlainDateTime>(item))
return &static_cast<PlainDateTime&>(item).calendar();
// TODO: The rest of the Temporal built-ins (PlainMonthDay, PlainTime, PlainYearMonth, ZonedDateTime)
if (is<PlainTime>(item))
return &static_cast<PlainTime&>(item).calendar();
// TODO: The rest of the Temporal built-ins (PlainMonthDay, PlainYearMonth, ZonedDateTime)
// 2. Let calendar be ? Get(item, "calendar").
auto calendar = item.get(vm.names.calendar);