mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 10:12:25 -05:00
LibJS: Handle Temporal.PlainDate in dynamic calendar operations
This commit is contained in:
parent
5be4825504
commit
c83a3db542
Notes:
github-actions[bot]
2024-11-24 00:38:29 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/c83a3db542d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2535
2 changed files with 6 additions and 0 deletions
|
@ -624,6 +624,8 @@ ThrowCompletionOr<bool> is_partial_temporal_object(VM& vm, Value value)
|
|||
// [[InitializedTemporalTime]], [[InitializedTemporalYearMonth]], or [[InitializedTemporalZonedDateTime]] internal
|
||||
// slot, return false.
|
||||
// FIXME: Add the other types as we define them.
|
||||
if (is<PlainDate>(object))
|
||||
return false;
|
||||
if (is<PlainMonthDay>(object))
|
||||
return false;
|
||||
if (is<PlainYearMonth>(object))
|
||||
|
|
|
@ -452,6 +452,8 @@ ThrowCompletionOr<String> to_temporal_calendar_identifier(VM& vm, Value temporal
|
|||
// internal slot, then
|
||||
// i. Return temporalCalendarLike.[[Calendar]].
|
||||
// FIXME: Add the other calendar-holding types as we define them.
|
||||
if (is<PlainDate>(temporal_calendar_object))
|
||||
return static_cast<PlainDate const&>(temporal_calendar_object).calendar();
|
||||
if (is<PlainMonthDay>(temporal_calendar_object))
|
||||
return static_cast<PlainMonthDay const&>(temporal_calendar_object).calendar();
|
||||
if (is<PlainYearMonth>(temporal_calendar_object))
|
||||
|
@ -476,6 +478,8 @@ ThrowCompletionOr<String> get_temporal_calendar_identifier_with_iso_default(VM&
|
|||
// [[InitializedTemporalYearMonth]], or [[InitializedTemporalZonedDateTime]] internal slot, then
|
||||
// a. Return item.[[Calendar]].
|
||||
// FIXME: Add the other calendar-holding types as we define them.
|
||||
if (is<PlainDate>(item))
|
||||
return static_cast<PlainDate const&>(item).calendar();
|
||||
if (is<PlainMonthDay>(item))
|
||||
return static_cast<PlainMonthDay const&>(item).calendar();
|
||||
if (is<PlainYearMonth>(item))
|
||||
|
|
Loading…
Add table
Reference in a new issue