mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibJS: Implement the Temporal.PlainYearMonth constructor
And the simple Temporal.PlainYearMonth.prototype getters, so that the constructed Temporal.PlainYearMonth may actually be validated.
This commit is contained in:
parent
1c733993e0
commit
b68d67693e
Notes:
github-actions[bot]
2024-11-22 18:56:56 +00:00
Author: https://github.com/trflynn89
Commit: b68d67693e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2496
27 changed files with 926 additions and 3 deletions
|
@ -18,6 +18,7 @@
|
|||
#include <LibJS/Runtime/Temporal/PlainDate.h>
|
||||
#include <LibJS/Runtime/Temporal/PlainDateTime.h>
|
||||
#include <LibJS/Runtime/Temporal/PlainMonthDay.h>
|
||||
#include <LibJS/Runtime/Temporal/PlainYearMonth.h>
|
||||
#include <LibJS/Runtime/Temporal/TimeZone.h>
|
||||
|
||||
namespace JS::Temporal {
|
||||
|
@ -467,6 +468,8 @@ ThrowCompletionOr<bool> is_partial_temporal_object(VM& vm, Value value)
|
|||
// FIXME: Add the other types as we define them.
|
||||
if (is<PlainMonthDay>(object))
|
||||
return false;
|
||||
if (is<PlainYearMonth>(object))
|
||||
return false;
|
||||
|
||||
// 3. Let calendarProperty be ? Get(value, "calendar").
|
||||
auto calendar_property = TRY(object.get(vm.names.calendar));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue