|
@@ -12,6 +12,7 @@
|
|
|
#include <LibJS/Runtime/Temporal/CalendarConstructor.h>
|
|
|
#include <LibJS/Runtime/Temporal/PlainDate.h>
|
|
|
#include <LibJS/Runtime/Temporal/PlainDateTime.h>
|
|
|
+#include <LibJS/Runtime/Temporal/PlainTime.h>
|
|
|
#include <LibJS/Runtime/Value.h>
|
|
|
|
|
|
namespace JS::Temporal {
|
|
@@ -297,7 +298,9 @@ Object* to_temporal_calendar(GlobalObject& global_object, Value temporal_calenda
|
|
|
return &static_cast<PlainDate&>(temporal_calendar_like_object).calendar();
|
|
|
if (is<PlainDateTime>(temporal_calendar_like_object))
|
|
|
return &static_cast<PlainDateTime&>(temporal_calendar_like_object).calendar();
|
|
|
- // TODO: The rest of the Temporal built-ins (PlainMonthDay, PlainTime, PlainYearMonth, ZonedDateTime)
|
|
|
+ if (is<PlainTime>(temporal_calendar_like_object))
|
|
|
+ return &static_cast<PlainTime&>(temporal_calendar_like_object).calendar();
|
|
|
+ // TODO: The rest of the Temporal built-ins (PlainMonthDay, PlainYearMonth, ZonedDateTime)
|
|
|
|
|
|
// b. If ? HasProperty(temporalCalendarLike, "calendar") is false, return temporalCalendarLike.
|
|
|
auto has_property = temporal_calendar_like_object.has_property(vm.names.calendar);
|