mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Implement basic of Temporal.PlainYearMonth
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
8b39a2c3ff
commit
641e3813c4
13 changed files with 531 additions and 234 deletions
|
|
@ -27,6 +27,7 @@
|
|||
#include "runtime/TemporalInstantObject.h"
|
||||
#include "runtime/TemporalPlainTimeObject.h"
|
||||
#include "runtime/TemporalPlainDateObject.h"
|
||||
#include "runtime/TemporalPlainYearMonthObject.h"
|
||||
#include "runtime/TemporalNowObject.h"
|
||||
#include "runtime/DateObject.h"
|
||||
#include "runtime/ArrayObject.h"
|
||||
|
|
@ -569,6 +570,105 @@ static Value builtinTemporalPlainDateUntil(ExecutionState& state, Value thisValu
|
|||
return plainDate->until(state, argv[0], argc > 1 ? argv[1] : Value());
|
||||
}
|
||||
|
||||
static Value builtinTemporalPlainYearMonthConstructor(ExecutionState& state, Value thisValue, size_t argc, Value* argv, Optional<Object*> newTarget)
|
||||
{
|
||||
// If NewTarget is undefined, throw a TypeError exception.
|
||||
if (!newTarget.hasValue()) {
|
||||
ErrorObject::throwBuiltinError(state, ErrorCode::TypeError, ErrorObject::Messages::GlobalObject_ConstructorRequiresNew);
|
||||
}
|
||||
|
||||
Object* proto = Object::getPrototypeFromConstructor(state, newTarget.value(), [](ExecutionState& state, Context* constructorRealm) -> Object* {
|
||||
return constructorRealm->globalObject()->temporalPlainYearMonthPrototype();
|
||||
});
|
||||
|
||||
Value referenceISODay = argc > 3 ? argv[3] : Value();
|
||||
// If referenceISODay is undefined, then
|
||||
if (referenceISODay.isUndefined()) {
|
||||
// Set referenceISODay to 1𝔽
|
||||
referenceISODay = Value(1);
|
||||
}
|
||||
|
||||
// Let y be ? ToIntegerWithTruncation(isoYear).
|
||||
auto y = argv[0].toIntegerWithTruncation(state);
|
||||
// Let m be ? ToIntegerWithTruncation(isoMonth).
|
||||
auto m = argv[1].toIntegerWithTruncation(state);
|
||||
// If calendar is undefined, set calendar to "iso8601".
|
||||
Value calendar = argc > 3 ? argv[3] : Value();
|
||||
if (calendar.isUndefined()) {
|
||||
calendar = state.context()->staticStrings().lazyISO8601().string();
|
||||
}
|
||||
// If calendar is not a String, throw a TypeError exception.
|
||||
if (!calendar.isString()) {
|
||||
ErrorObject::throwBuiltinError(state, ErrorCode::TypeError, "calendar must be String");
|
||||
}
|
||||
// Set calendar to ? CanonicalizeCalendar(calendar).
|
||||
auto mayCalendar = Calendar::fromString(calendar.asString());
|
||||
if (!mayCalendar) {
|
||||
ErrorObject::throwBuiltinError(state, ErrorCode::RangeError, "Invalid calendar");
|
||||
}
|
||||
// Let ref be ? ToIntegerWithTruncation(referenceISODay).
|
||||
auto ref = referenceISODay.toIntegerWithTruncation(state);
|
||||
// If IsValidISODate(y, m, ref) is false, throw a RangeError exception.
|
||||
// If IsValidISODate(y, m, d) is false, throw a RangeError exception.
|
||||
if (m < 1 || m > 12 || ref < 1 || ref > ISO8601::daysInMonth(y, m) || !ISO8601::isDateTimeWithinLimits(y, m, ref, 12, 0, 0, 0, 0, 0)) {
|
||||
ErrorObject::throwBuiltinError(state, ErrorCode::RangeError, "date is out of range");
|
||||
}
|
||||
// Let isoDate be CreateISODateRecord(y, m, ref).
|
||||
// Return ? CreateTemporalYearMonth(isoDate, calendar, NewTarget).
|
||||
return new TemporalPlainYearMonthObject(state, proto, ISO8601::PlainDate(y, m, ref), mayCalendar.value());
|
||||
}
|
||||
|
||||
static Value builtinTemporalPlainYearMonthFrom(ExecutionState& state, Value thisValue, size_t argc, Value* argv, Optional<Object*> newTarget)
|
||||
{
|
||||
return Temporal::toTemporalYearMonth(state, argv[0], argc > 1 ? argv[1] : Value());
|
||||
}
|
||||
|
||||
#define RESOLVE_THIS_BINDING_TO_PLAINYEARMONTH(NAME, BUILT_IN_METHOD) \
|
||||
if (!thisValue.isObject() || !thisValue.asObject()->isTemporalPlainYearMonthObject()) { \
|
||||
ErrorObject::throwBuiltinError(state, ErrorCode::TypeError, state.context()->staticStrings().lazyCapitalPlainYearMonth().string(), true, state.context()->staticStrings().lazy##BUILT_IN_METHOD().string(), ErrorObject::Messages::GlobalObject_CalledOnIncompatibleReceiver); \
|
||||
} \
|
||||
TemporalPlainYearMonthObject* NAME = thisValue.asObject()->asTemporalPlainYearMonthObject();
|
||||
|
||||
#define RESOLVE_THIS_BINDING_TO_PLAINYEARMONTH2(NAME, BUILT_IN_METHOD) \
|
||||
if (!thisValue.isObject() || !thisValue.asObject()->isTemporalPlainYearMonthObject()) { \
|
||||
ErrorObject::throwBuiltinError(state, ErrorCode::TypeError, state.context()->staticStrings().lazyCapitalPlainYearMonth().string(), true, state.context()->staticStrings().BUILT_IN_METHOD.string(), ErrorObject::Messages::GlobalObject_CalledOnIncompatibleReceiver); \
|
||||
} \
|
||||
TemporalPlainYearMonthObject* NAME = thisValue.asObject()->asTemporalPlainYearMonthObject();
|
||||
|
||||
static Value builtinTemporalPlainYearMonthCalendarId(ExecutionState& state, Value thisValue, size_t argc, Value* argv, Optional<Object*> newTarget)
|
||||
{
|
||||
RESOLVE_THIS_BINDING_TO_PLAINYEARMONTH(temporalYearMonth, CalendarId);
|
||||
if (temporalYearMonth->calendarID() == Calendar(Calendar::ID::ISO8601)) {
|
||||
return state.context()->staticStrings().lazyISO8601().string();
|
||||
} else {
|
||||
return temporalYearMonth->calendarID().toString();
|
||||
}
|
||||
}
|
||||
|
||||
static Value builtinTemporalPlainYearMonthMonthCode(ExecutionState& state, Value thisValue, size_t argc, Value* argv, Optional<Object*> newTarget)
|
||||
{
|
||||
RESOLVE_THIS_BINDING_TO_PLAINYEARMONTH(temporalYearMonth, MonthCode);
|
||||
return temporalYearMonth->monthCode(state);
|
||||
}
|
||||
|
||||
static Value builtinTemporalPlainYearMonthToJSON(ExecutionState& state, Value thisValue, size_t argc, Value* argv, Optional<Object*> newTarget)
|
||||
{
|
||||
RESOLVE_THIS_BINDING_TO_PLAINYEARMONTH2(plainYearMonth, toJSON);
|
||||
return plainYearMonth->toString(state, Value());
|
||||
}
|
||||
|
||||
static Value builtinTemporalPlainYearMonthToLocaleString(ExecutionState& state, Value thisValue, size_t argc, Value* argv, Optional<Object*> newTarget)
|
||||
{
|
||||
RESOLVE_THIS_BINDING_TO_PLAINYEARMONTH2(plainYearMonth, toLocaleString);
|
||||
return plainYearMonth->toString(state, Value());
|
||||
}
|
||||
|
||||
static Value builtinTemporalPlainYearMonthToString(ExecutionState& state, Value thisValue, size_t argc, Value* argv, Optional<Object*> newTarget)
|
||||
{
|
||||
RESOLVE_THIS_BINDING_TO_PLAINYEARMONTH2(plainYearMonth, toString);
|
||||
return plainYearMonth->toString(state, argc ? argv[0] : Value());
|
||||
}
|
||||
|
||||
void GlobalObject::initializeTemporal(ExecutionState& state)
|
||||
{
|
||||
ObjectPropertyNativeGetterSetterData* nativeData = new ObjectPropertyNativeGetterSetterData(
|
||||
|
|
@ -856,6 +956,82 @@ void GlobalObject::installTemporal(ExecutionState& state)
|
|||
|
||||
m_temporalPlainDate->setFunctionPrototype(state, m_temporalPlainDatePrototype);
|
||||
|
||||
// Temporal.PlainYearMonth
|
||||
m_temporalPlainYearMonth = new NativeFunctionObject(state, NativeFunctionInfo(strings->lazyCapitalPlainYearMonth(), builtinTemporalPlainYearMonthConstructor, 2), NativeFunctionObject::__ForBuiltinConstructor__);
|
||||
m_temporalPlainYearMonth->setGlobalIntrinsicObject(state);
|
||||
|
||||
m_temporalPlainYearMonth->directDefineOwnProperty(state, ObjectPropertyName(strings->from), ObjectPropertyDescriptor(new NativeFunctionObject(state, NativeFunctionInfo(strings->from, builtinTemporalPlainYearMonthFrom, 1, NativeFunctionInfo::Strict)), (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
|
||||
|
||||
m_temporalPlainYearMonthPrototype = m_temporalPlainYearMonth->getFunctionPrototype(state).asObject();
|
||||
m_temporalPlainYearMonthPrototype->directDefineOwnProperty(state, ObjectPropertyName(state.context()->vmInstance()->globalSymbols().toStringTag),
|
||||
ObjectPropertyDescriptor(Value(strings->lazyTemporalDotPlainYearMonth().string()), (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::ConfigurablePresent)));
|
||||
m_temporalPlainYearMonthPrototype->directDefineOwnProperty(state, ObjectPropertyName(strings->toString), ObjectPropertyDescriptor(new NativeFunctionObject(state, NativeFunctionInfo(strings->toString, builtinTemporalPlainYearMonthToString, 0, NativeFunctionInfo::Strict)), (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
|
||||
m_temporalPlainYearMonthPrototype->directDefineOwnProperty(state, ObjectPropertyName(strings->toJSON), ObjectPropertyDescriptor(new NativeFunctionObject(state, NativeFunctionInfo(strings->toJSON, builtinTemporalPlainYearMonthToJSON, 0, NativeFunctionInfo::Strict)), (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
|
||||
m_temporalPlainYearMonthPrototype->directDefineOwnProperty(state, ObjectPropertyName(strings->toLocaleString), ObjectPropertyDescriptor(new NativeFunctionObject(state, NativeFunctionInfo(strings->toLocaleString, builtinTemporalPlainYearMonthToLocaleString, 0, NativeFunctionInfo::Strict)), (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
|
||||
m_temporalPlainYearMonthPrototype->directDefineOwnProperty(state, ObjectPropertyName(strings->valueOf), ObjectPropertyDescriptor(new NativeFunctionObject(state, NativeFunctionInfo(strings->valueOf, builtinTemporalAnyInstanceValueOf, 0, NativeFunctionInfo::Strict)), (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
|
||||
|
||||
{
|
||||
AtomicString name(state.context(), "get calendarId");
|
||||
JSGetterSetter gs(
|
||||
new NativeFunctionObject(state, NativeFunctionInfo(name, builtinTemporalPlainYearMonthCalendarId, 0, NativeFunctionInfo::Strict)),
|
||||
Value(Value::EmptyValue));
|
||||
ObjectPropertyDescriptor desc(gs, ObjectPropertyDescriptor::ConfigurablePresent);
|
||||
m_temporalPlainYearMonthPrototype->directDefineOwnProperty(state, ObjectPropertyName(strings->lazyCalendarId()), desc);
|
||||
}
|
||||
|
||||
{
|
||||
AtomicString name(state.context(), "get monthCode");
|
||||
JSGetterSetter gs(
|
||||
new NativeFunctionObject(state, NativeFunctionInfo(name, builtinTemporalPlainYearMonthMonthCode, 0, NativeFunctionInfo::Strict)),
|
||||
Value(Value::EmptyValue));
|
||||
ObjectPropertyDescriptor desc(gs, ObjectPropertyDescriptor::ConfigurablePresent);
|
||||
m_temporalPlainYearMonthPrototype->directDefineOwnProperty(state, ObjectPropertyName(strings->lazyMonthCode()), desc);
|
||||
}
|
||||
|
||||
#define DEFINE_PLAINYEAR_PROTOTYPE_GETTER_PROPERTY(name, stringName, Name) \
|
||||
{ \
|
||||
AtomicString name(state.context(), "get " stringName); \
|
||||
auto getter = new NativeFunctionObject(state, NativeFunctionInfo(name, [](ExecutionState& state, Value thisValue, size_t argc, Value* argv, Optional<Object*> newTarget) -> Value { \
|
||||
if (!thisValue.isObject() || !thisValue.asObject()->isTemporalPlainYearMonthObject()) { \
|
||||
ErrorObject::throwBuiltinError(state, ErrorCode::TypeError, state.context()->staticStrings().lazyCapitalPlainYearMonth().string(), true, String::fromASCII(stringName), ErrorObject::Messages::GlobalObject_CalledOnIncompatibleReceiver); \
|
||||
} \
|
||||
TemporalPlainYearMonthObject* s = thisValue.asObject()->asTemporalPlainYearMonthObject(); \
|
||||
return Value(s->plainDate().name()); }, 0, NativeFunctionInfo::Strict)); \
|
||||
JSGetterSetter gs(getter, Value()); \
|
||||
ObjectPropertyDescriptor desc(gs, ObjectPropertyDescriptor::ConfigurablePresent); \
|
||||
m_temporalPlainYearMonthPrototype->directDefineOwnProperty(state, ObjectPropertyName(state, strings->lazy##Name()), desc); \
|
||||
}
|
||||
|
||||
#define DEFINE_GETTER(name, Name) DEFINE_PLAINYEAR_PROTOTYPE_GETTER_PROPERTY(name, #name, Name)
|
||||
PLAIN_YEARMONTH_UNITS(DEFINE_GETTER)
|
||||
#undef DEFINE_GETTER
|
||||
|
||||
#define PLAINYEARMONTH_EXTRA_PROPERTY(F) \
|
||||
F(era, Era) \
|
||||
F(eraYear, EraYear) \
|
||||
F(daysInMonth, DaysInMonth) \
|
||||
F(daysInYear, DaysInYear) \
|
||||
F(monthsInYear, MonthsInYear) \
|
||||
F(inLeapYear, InLeapYear)
|
||||
|
||||
#define DEFINE_PLAINYEARMONTH_PROTOTYPE_EXTRA_GETTER_PROPERTY(name, stringName, Name) \
|
||||
{ \
|
||||
AtomicString name(state.context(), "get " stringName); \
|
||||
AtomicString pName(state.context(), stringName); \
|
||||
auto getter = new NativeFunctionObject(state, NativeFunctionInfo(name, [](ExecutionState& state, Value thisValue, size_t argc, Value* argv, Optional<Object*> newTarget) -> Value { \
|
||||
if (!thisValue.isObject() || !thisValue.asObject()->isTemporalPlainYearMonthObject()) { \
|
||||
ErrorObject::throwBuiltinError(state, ErrorCode::TypeError, state.context()->staticStrings().lazyCapitalPlainYearMonth().string(), true, String::fromASCII(stringName), ErrorObject::Messages::GlobalObject_CalledOnIncompatibleReceiver); \
|
||||
} \
|
||||
TemporalPlainYearMonthObject* s = thisValue.asObject()->asTemporalPlainYearMonthObject(); \
|
||||
return Value(s->name(state)); }, 0, NativeFunctionInfo::Strict)); \
|
||||
JSGetterSetter gs(getter, Value()); \
|
||||
ObjectPropertyDescriptor desc(gs, ObjectPropertyDescriptor::ConfigurablePresent); \
|
||||
m_temporalPlainYearMonthPrototype->directDefineOwnProperty(state, ObjectPropertyName(state, strings->lazy##Name()), desc); \
|
||||
}
|
||||
#define DEFINE_GETTER(name, Name) DEFINE_PLAINYEARMONTH_PROTOTYPE_EXTRA_GETTER_PROPERTY(name, #name, Name)
|
||||
PLAINYEARMONTH_EXTRA_PROPERTY(DEFINE_GETTER)
|
||||
#undef DEFINE_GETTER
|
||||
|
||||
|
||||
m_temporal = new Object(state);
|
||||
m_temporal->setGlobalIntrinsicObject(state);
|
||||
|
|
@ -878,6 +1054,9 @@ void GlobalObject::installTemporal(ExecutionState& state)
|
|||
m_temporal->directDefineOwnProperty(state, ObjectPropertyName(strings->lazyCapitalPlainDate()),
|
||||
ObjectPropertyDescriptor(m_temporalPlainDate, (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
|
||||
|
||||
m_temporal->directDefineOwnProperty(state, ObjectPropertyName(strings->lazyCapitalPlainYearMonth()),
|
||||
ObjectPropertyDescriptor(m_temporalPlainYearMonth, (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
|
||||
|
||||
redefineOwnProperty(state, ObjectPropertyName(strings->lazyCapitalTemporal()),
|
||||
ObjectPropertyDescriptor(m_temporal, (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -276,17 +276,19 @@ class FunctionObject;
|
|||
F(finalizationRegistryPrototype, Object, objName)
|
||||
|
||||
#if defined(ENABLE_TEMPORAL)
|
||||
#define GLOBALOBJECT_BUILTIN_TEMPORAL(F, objName) \
|
||||
F(temporal, Object, objName) \
|
||||
F(temporalNow, Object, objName) \
|
||||
F(temporalDuration, FunctionObject, objName) \
|
||||
F(temporalDurationPrototype, Object, objName) \
|
||||
F(temporalInstant, FunctionObject, objName) \
|
||||
F(temporalInstantPrototype, Object, objName) \
|
||||
F(temporalPlainTime, FunctionObject, objName) \
|
||||
F(temporalPlainTimePrototype, Object, objName) \
|
||||
F(temporalPlainDate, FunctionObject, objName) \
|
||||
F(temporalPlainDatePrototype, Object, objName)
|
||||
#define GLOBALOBJECT_BUILTIN_TEMPORAL(F, objName) \
|
||||
F(temporal, Object, objName) \
|
||||
F(temporalNow, Object, objName) \
|
||||
F(temporalDuration, FunctionObject, objName) \
|
||||
F(temporalDurationPrototype, Object, objName) \
|
||||
F(temporalInstant, FunctionObject, objName) \
|
||||
F(temporalInstantPrototype, Object, objName) \
|
||||
F(temporalPlainTime, FunctionObject, objName) \
|
||||
F(temporalPlainTimePrototype, Object, objName) \
|
||||
F(temporalPlainDate, FunctionObject, objName) \
|
||||
F(temporalPlainDatePrototype, Object, objName) \
|
||||
F(temporalPlainYearMonth, FunctionObject, objName) \
|
||||
F(temporalPlainYearMonthPrototype, Object, objName)
|
||||
#else
|
||||
#define GLOBALOBJECT_BUILTIN_TEMPORAL(F, objName)
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -80,6 +80,8 @@ struct DisposableResourceRecord;
|
|||
class TemporalObject;
|
||||
class TemporalPlainTimeObject;
|
||||
class TemporalPlainDateObject;
|
||||
class TemporalPlainYearMonthObject;
|
||||
class TemporalPlainMonthDayObject;
|
||||
class TemporalPlainDateTimeObject;
|
||||
class TemporalZonedDateTimeObject;
|
||||
class TemporalInstantObject;
|
||||
|
|
@ -608,6 +610,16 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
virtual bool isTemporalPlainYearMonthObject() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool isTemporalPlainMonthDayObject() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool isTemporalPlainDateTimeObject() const
|
||||
{
|
||||
return false;
|
||||
|
|
@ -1098,6 +1110,18 @@ public:
|
|||
return (TemporalPlainDateObject*)this;
|
||||
}
|
||||
|
||||
TemporalPlainYearMonthObject* asTemporalPlainYearMonthObject()
|
||||
{
|
||||
ASSERT(isTemporalPlainYearMonthObject());
|
||||
return (TemporalPlainYearMonthObject*)this;
|
||||
}
|
||||
|
||||
TemporalPlainMonthDayObject* asTemporalPlainMonthDayObject()
|
||||
{
|
||||
ASSERT(isTemporalPlainMonthDayObject());
|
||||
return (TemporalPlainMonthDayObject*)this;
|
||||
}
|
||||
|
||||
TemporalPlainDateTimeObject* asTemporalPlainDateTimeObject()
|
||||
{
|
||||
ASSERT(isTemporalPlainDateTimeObject());
|
||||
|
|
|
|||
|
|
@ -959,58 +959,60 @@ namespace Escargot {
|
|||
#endif
|
||||
|
||||
#if defined(ENABLE_TEMPORAL)
|
||||
#define FOR_EACH_LAZY_TEMPORAL_STATIC_STRING(F) \
|
||||
F(Blank, "blank") \
|
||||
F(CalendarId, "calendarId") \
|
||||
F(CalendarName, "calendarName") \
|
||||
F(CapitalDuration, "Duration") \
|
||||
F(CapitalInstant, "Instant") \
|
||||
F(CapitalNow, "Now") \
|
||||
F(CapitalPlainDate, "PlainDate") \
|
||||
F(CapitalPlainDateTime, "PlainDateTime") \
|
||||
F(CapitalPlainTime, "PlainTime") \
|
||||
F(CapitalTemporal, "Temporal") \
|
||||
F(Critical, "critical") \
|
||||
F(DayOfWeek, "dayOfWeek") \
|
||||
F(DayOfYear, "dayOfYear") \
|
||||
F(DaysInMonth, "daysInMonth") \
|
||||
F(DaysInWeek, "daysInWeek") \
|
||||
F(DaysInYear, "daysInYear") \
|
||||
F(EraYear, "eraYear") \
|
||||
F(EpochMilliseconds, "epochMilliseconds") \
|
||||
F(EpochNanoseconds, "epochNanoseconds") \
|
||||
F(Equals, "equals") \
|
||||
F(FromEpochMilliseconds, "fromEpochMilliseconds") \
|
||||
F(FromEpochNanoseconds, "fromEpochNanoseconds") \
|
||||
F(GetEpochMilliseconds, "get epochMilliseconds") \
|
||||
F(GetEpochNanoseconds, "get epochNanoseconds") \
|
||||
F(InLeapYear, "inLeapYear") \
|
||||
F(Instant, "instant") \
|
||||
F(ISO8601, "iso8601") \
|
||||
F(LargestUnit, "largestUnit") \
|
||||
F(MonthCode, "monthCode") \
|
||||
F(MonthsInYear, "monthsInYear") \
|
||||
F(Negated, "negated") \
|
||||
F(Offset, "offset") \
|
||||
F(Overflow, "overflow") \
|
||||
F(Reject, "reject") \
|
||||
F(PlainDateISO, "plainDateISO") \
|
||||
F(PlainDateTimeISO, "plainDateTimeISO") \
|
||||
F(PlainTimeISO, "plainTimeISO") \
|
||||
F(Since, "since") \
|
||||
F(SmallestUnit, "smallestUnit") \
|
||||
F(Subtract, "subtract") \
|
||||
F(TemporalDotDuration, "Temporal.Duration") \
|
||||
F(TemporalDotInstant, "Temporal.Instant") \
|
||||
F(TemporalDotNow, "Temporal.Now") \
|
||||
F(TemporalDotPlainDate, "Temporal.PlainDate") \
|
||||
F(TemporalDotPlainDateTime, "Temporal.PlainDateTime") \
|
||||
F(TemporalDotPlainTime, "Temporal.PlainTime") \
|
||||
F(TimeZoneId, "timeZoneId") \
|
||||
F(Until, "until") \
|
||||
F(WeekOfYear, "weekOfYear") \
|
||||
F(WithCalendar, "withCalendar") \
|
||||
F(YearOfWeek, "yearOfWeek") \
|
||||
#define FOR_EACH_LAZY_TEMPORAL_STATIC_STRING(F) \
|
||||
F(Blank, "blank") \
|
||||
F(CalendarId, "calendarId") \
|
||||
F(CalendarName, "calendarName") \
|
||||
F(CapitalDuration, "Duration") \
|
||||
F(CapitalInstant, "Instant") \
|
||||
F(CapitalNow, "Now") \
|
||||
F(CapitalPlainDate, "PlainDate") \
|
||||
F(CapitalPlainDateTime, "PlainDateTime") \
|
||||
F(CapitalPlainTime, "PlainTime") \
|
||||
F(CapitalPlainYearMonth, "PlainYearMonth") \
|
||||
F(CapitalTemporal, "Temporal") \
|
||||
F(Critical, "critical") \
|
||||
F(DayOfWeek, "dayOfWeek") \
|
||||
F(DayOfYear, "dayOfYear") \
|
||||
F(DaysInMonth, "daysInMonth") \
|
||||
F(DaysInWeek, "daysInWeek") \
|
||||
F(DaysInYear, "daysInYear") \
|
||||
F(EraYear, "eraYear") \
|
||||
F(EpochMilliseconds, "epochMilliseconds") \
|
||||
F(EpochNanoseconds, "epochNanoseconds") \
|
||||
F(Equals, "equals") \
|
||||
F(FromEpochMilliseconds, "fromEpochMilliseconds") \
|
||||
F(FromEpochNanoseconds, "fromEpochNanoseconds") \
|
||||
F(GetEpochMilliseconds, "get epochMilliseconds") \
|
||||
F(GetEpochNanoseconds, "get epochNanoseconds") \
|
||||
F(InLeapYear, "inLeapYear") \
|
||||
F(Instant, "instant") \
|
||||
F(ISO8601, "iso8601") \
|
||||
F(LargestUnit, "largestUnit") \
|
||||
F(MonthCode, "monthCode") \
|
||||
F(MonthsInYear, "monthsInYear") \
|
||||
F(Negated, "negated") \
|
||||
F(Offset, "offset") \
|
||||
F(Overflow, "overflow") \
|
||||
F(Reject, "reject") \
|
||||
F(PlainDateISO, "plainDateISO") \
|
||||
F(PlainDateTimeISO, "plainDateTimeISO") \
|
||||
F(PlainTimeISO, "plainTimeISO") \
|
||||
F(Since, "since") \
|
||||
F(SmallestUnit, "smallestUnit") \
|
||||
F(Subtract, "subtract") \
|
||||
F(TemporalDotDuration, "Temporal.Duration") \
|
||||
F(TemporalDotInstant, "Temporal.Instant") \
|
||||
F(TemporalDotNow, "Temporal.Now") \
|
||||
F(TemporalDotPlainDate, "Temporal.PlainDate") \
|
||||
F(TemporalDotPlainDateTime, "Temporal.PlainDateTime") \
|
||||
F(TemporalDotPlainTime, "Temporal.PlainTime") \
|
||||
F(TemporalDotPlainYearMonth, "Temporal.PlainYearMonth") \
|
||||
F(TimeZoneId, "timeZoneId") \
|
||||
F(Until, "until") \
|
||||
F(WeekOfYear, "weekOfYear") \
|
||||
F(WithCalendar, "withCalendar") \
|
||||
F(YearOfWeek, "yearOfWeek") \
|
||||
F(ZonedDateTimeISO, "zonedDateTimeISO")
|
||||
#else
|
||||
#define FOR_EACH_LAZY_TEMPORAL_STATIC_STRING(F)
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
#include "runtime/TemporalInstantObject.h"
|
||||
#include "runtime/TemporalPlainTimeObject.h"
|
||||
#include "runtime/TemporalPlainDateObject.h"
|
||||
#include "runtime/TemporalPlainYearMonthObject.h"
|
||||
#include "intl/Intl.h"
|
||||
|
||||
namespace Escargot {
|
||||
|
|
@ -487,6 +488,98 @@ TemporalPlainDateObject* Temporal::toTemporalDate(ExecutionState& state, Value i
|
|||
std::get<0>(result.value()), mayID.value());
|
||||
}
|
||||
|
||||
TemporalPlainYearMonthObject* Temporal::toTemporalYearMonth(ExecutionState& state, Value item, Value options)
|
||||
{
|
||||
// If options is not present, set options to undefined.
|
||||
// If item is an Object, then
|
||||
if (item.isObject()) {
|
||||
// If item has an [[InitializedTemporalDate]] internal slot, then
|
||||
if (item.asObject()->isTemporalPlainYearMonthObject()) {
|
||||
// Let resolvedOptions be ? GetOptionsObject(options).
|
||||
auto resolvedOptions = Intl::getOptionsObject(state, options);
|
||||
// Perform ? GetTemporalOverflowOption(resolvedOptions).
|
||||
Temporal::getTemporalOverflowOption(state, resolvedOptions);
|
||||
// Return ! CreateTemporalYearMonth(item.[[ISODate]], item.[[Calendar]]).
|
||||
return new TemporalPlainYearMonthObject(state, state.context()->globalObject()->temporalPlainYearMonthPrototype(),
|
||||
item.asObject()->asTemporalPlainYearMonthObject()->plainDate(), item.asObject()->asTemporalPlainYearMonthObject()->calendarID());
|
||||
}
|
||||
|
||||
// Let calendar be ? GetTemporalCalendarIdentifierWithISODefault(item).
|
||||
auto calendar = Temporal::getTemporalCalendarIdentifierWithISODefault(state, item);
|
||||
// Let fields be ? PrepareCalendarFields(calendar, item, « year, month, month-code », «», «»).
|
||||
CalendarField f[3] = { CalendarField::Year, CalendarField::Month, CalendarField::MonthCode };
|
||||
auto fields = prepareCalendarFields(state, calendar, item.asObject(), f, 3, nullptr, 0, nullptr, 0);
|
||||
fields.day = 1;
|
||||
// Let resolvedOptions be ? GetOptionsObject(options).
|
||||
auto resolvedOptions = Intl::getOptionsObject(state, options);
|
||||
// Let overflow be ? GetTemporalOverflowOption(resolvedOptions).
|
||||
auto overflow = Temporal::getTemporalOverflowOption(state, resolvedOptions);
|
||||
// Let isoDate be ? CalendarDateFromFields(calendar, fields, overflow).
|
||||
auto isoDate = calendarDateFromFields(state, calendar, fields, overflow);
|
||||
// Return ! CreateTemporalYearMonth(isoDate, calendar).
|
||||
return new TemporalPlainYearMonthObject(state, state.context()->globalObject()->temporalPlainYearMonthPrototype(),
|
||||
isoDate, calendar);
|
||||
}
|
||||
|
||||
// If item is not a String, throw a TypeError exception.
|
||||
if (!item.isString()) {
|
||||
ErrorObject::throwBuiltinError(state, ErrorCode::TypeError, "ToTemporalYearMonth needs Object or String");
|
||||
}
|
||||
// Let result be ? ParseISODateTime(item, « TemporalYearMonthString »).
|
||||
ISO8601::DateTimeParseOption option;
|
||||
option.allowTimeZoneTimeWithoutTime = true;
|
||||
auto result = ISO8601::parseCalendarDateTime(item.asString(), option);
|
||||
auto parseResultYearMonth = ISO8601::parseCalendarYearMonth(item.asString(), option);
|
||||
if (!result && !parseResultYearMonth) {
|
||||
ErrorObject::throwBuiltinError(state, ErrorCode::RangeError, "ToTemporalYearMonth needs ISO Date string");
|
||||
}
|
||||
if (result && std::get<2>(result.value()) && std::get<2>(result.value()).value().m_z) {
|
||||
ErrorObject::throwBuiltinError(state, ErrorCode::RangeError, "ToTemporalYearMonth needs ISO Time string without UTC designator");
|
||||
}
|
||||
if (result && !std::get<1>(result.value()) && std::get<2>(result.value()) && std::get<2>(result.value()).value().m_offset.hasValue() && !std::get<3>(result.value())) {
|
||||
ErrorObject::throwBuiltinError(state, ErrorCode::RangeError, "ToTemporalYearMonth needs ISO Date string");
|
||||
}
|
||||
|
||||
ISO8601::PlainDate plainDate;
|
||||
ISO8601::CalendarID calendarID;
|
||||
if (result) {
|
||||
plainDate = std::get<0>(result.value());
|
||||
plainDate = ISO8601::PlainDate(plainDate.year(), plainDate.month(), 1);
|
||||
if (std::get<3>(result.value())) {
|
||||
calendarID = std::get<3>(result.value()).value();
|
||||
}
|
||||
} else {
|
||||
plainDate = std::get<0>(parseResultYearMonth.value());
|
||||
if (std::get<1>(parseResultYearMonth.value())) {
|
||||
calendarID = std::get<3>(result.value()).value();
|
||||
}
|
||||
}
|
||||
|
||||
if (!ISO8601::isDateTimeWithinLimits(plainDate.year(), plainDate.month(), plainDate.day(), 12, 0, 0, 0, 0, 0)) {
|
||||
ErrorObject::throwBuiltinError(state, ErrorCode::RangeError, "ToTemporalYearMonth needs ISO Date string in valid range");
|
||||
}
|
||||
|
||||
// Let calendar be result.[[Calendar]].
|
||||
// If calendar is empty, set calendar to "iso8601".
|
||||
String* calendar = state.context()->staticStrings().lazyISO8601().string();
|
||||
if (calendarID.size()) {
|
||||
calendar = String::fromUTF8(calendarID.data(), calendarID.length());
|
||||
}
|
||||
// Set calendar to ? CanonicalizeCalendar(calendar).
|
||||
auto mayID = Calendar::fromString(calendar);
|
||||
if (!mayID) {
|
||||
ErrorObject::throwBuiltinError(state, ErrorCode::RangeError, "Invalid CalendarID");
|
||||
}
|
||||
// Let resolvedOptions be ? GetOptionsObject(options).
|
||||
auto resolvedOptions = Intl::getOptionsObject(state, options);
|
||||
// Perform ? GetTemporalOverflowOption(resolvedOptions).
|
||||
Temporal::getTemporalOverflowOption(state, resolvedOptions);
|
||||
// Let isoDate be CreateISODateRecord(result.[[Year]], result.[[Month]], result.[[Day]]).
|
||||
// Return ? CreateTemporalDate(isoDate, calendar).
|
||||
return new TemporalPlainYearMonthObject(state, state.context()->globalObject()->temporalPlainYearMonthPrototype(),
|
||||
plainDate, mayID.value());
|
||||
}
|
||||
|
||||
Optional<unsigned> Temporal::getTemporalFractionalSecondDigitsOption(ExecutionState& state, Optional<Object*> resolvedOptions)
|
||||
{
|
||||
constexpr auto msg = "The value you gave for GetTemporalFractionalSecondDigitsOption is invalid";
|
||||
|
|
@ -1200,8 +1293,6 @@ Calendar Temporal::toTemporalCalendarIdentifier(ExecutionState& state, Value tem
|
|||
auto parseResult = ISO8601::parseCalendarDateTime(temporalCalendarLike.asString());
|
||||
auto parseResultYearMonth = ISO8601::parseCalendarYearMonth(temporalCalendarLike.asString());
|
||||
auto parseResultMonthDay = ISO8601::parseCalendarMonthDay(temporalCalendarLike.asString());
|
||||
// TODO parse m-d, y-m from when implement YearMonth, MonthDay
|
||||
// test/built-ins/Temporal/PlainDate/from/argument-propertybag-calendar-iso-string.js
|
||||
if (!mayCalendar && !parseResult && !parseResultYearMonth && !parseResultMonthDay) {
|
||||
ErrorObject::throwBuiltinError(state, ErrorCode::RangeError, "Invalid calendar");
|
||||
}
|
||||
|
|
@ -2278,6 +2369,21 @@ ISO8601::InternalDuration Temporal::roundRelativeDuration(ExecutionState& state,
|
|||
return duration;
|
||||
}
|
||||
|
||||
void Temporal::formatCalendarAnnotation(StringBuilder& builder, Calendar calendar, TemporalShowCalendarNameOption showCalendar)
|
||||
{
|
||||
if (showCalendar == TemporalShowCalendarNameOption::Never) {
|
||||
} else if (showCalendar == TemporalShowCalendarNameOption::Auto && calendar.isISO8601()) {
|
||||
} else {
|
||||
builder.appendChar('[');
|
||||
if (showCalendar == TemporalShowCalendarNameOption::Critical) {
|
||||
builder.appendChar('!');
|
||||
}
|
||||
builder.appendString("u-ca=");
|
||||
builder.appendString(calendar.toString());
|
||||
builder.appendChar(']');
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Escargot
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -248,6 +248,9 @@ public:
|
|||
// https://tc39.es/proposal-temporal/#sec-temporal-totemporaldate
|
||||
static TemporalPlainDateObject* toTemporalDate(ExecutionState& state, Value item, Value options);
|
||||
|
||||
// https://tc39.es/proposal-temporal/#sec-temporal-totemporalyearmonth
|
||||
static TemporalPlainYearMonthObject* toTemporalYearMonth(ExecutionState& state, Value item, Value options);
|
||||
|
||||
// https://tc39.es/proposal-temporal/#sec-temporal-gettemporalfractionalseconddigitsoption
|
||||
// NullOption means AUTO
|
||||
static Optional<unsigned> getTemporalFractionalSecondDigitsOption(ExecutionState& state, Optional<Object*> resolvedOptions);
|
||||
|
|
@ -362,6 +365,9 @@ public:
|
|||
|
||||
// https://tc39.es/proposal-temporal/#sec-temporal-getepochnanosecondsfor
|
||||
static Int128 getEpochNanosecondsFor(ExecutionState& state, Optional<TimeZone> timeZone, ISO8601::PlainDateTime isoDateTime, TemporalDisambiguationOption disambiguation);
|
||||
|
||||
// https://tc39.es/proposal-temporal/#sec-temporal-formatcalendarannotation
|
||||
static void formatCalendarAnnotation(StringBuilder& builder, Calendar calendar, TemporalShowCalendarNameOption showCalendar);
|
||||
};
|
||||
|
||||
} // namespace Escargot
|
||||
|
|
|
|||
|
|
@ -122,19 +122,7 @@ static String* temporalDateToString(ISO8601::PlainDate plainDate, Calendar calen
|
|||
builder.appendString(String::fromASCII(s.data(), s.length()));
|
||||
}
|
||||
|
||||
// https://tc39.es/proposal-temporal/#sec-temporal-formatcalendarannotation
|
||||
// FormatCalendarAnnotation steps
|
||||
if (showCalendar == TemporalShowCalendarNameOption::Never) {
|
||||
} else if (showCalendar == TemporalShowCalendarNameOption::Auto && calendar == Calendar()) {
|
||||
} else {
|
||||
builder.appendChar('[');
|
||||
if (showCalendar == TemporalShowCalendarNameOption::Critical) {
|
||||
builder.appendChar('!');
|
||||
}
|
||||
builder.appendString("u-ca=");
|
||||
builder.appendString(calendar.toString());
|
||||
builder.appendChar(']');
|
||||
}
|
||||
Temporal::formatCalendarAnnotation(builder, calendar, showCalendar);
|
||||
|
||||
return builder.finalize();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public:
|
|||
static int compare(ExecutionState& state, Value one, Value two);
|
||||
static int compareISODate(ExecutionState& state, TemporalPlainDateObject* one, TemporalPlainDateObject* two);
|
||||
|
||||
private:
|
||||
protected:
|
||||
ISO8601::PlainDate computeISODate(ExecutionState& state);
|
||||
|
||||
// https://tc39.es/proposal-temporal/#sec-temporal-differencetemporalplaindate
|
||||
|
|
|
|||
87
src/runtime/TemporalPlainYearMonthObject.cpp
Normal file
87
src/runtime/TemporalPlainYearMonthObject.cpp
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
#if defined(ENABLE_TEMPORAL)
|
||||
/*
|
||||
* Copyright (c) 2025-present Samsung Electronics Co., Ltd
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
* USA
|
||||
*/
|
||||
|
||||
#include "Escargot.h"
|
||||
#include "TemporalPlainYearMonthObject.h"
|
||||
#include "TemporalDurationObject.h"
|
||||
#include "intl/Intl.h"
|
||||
#include "util/ISO8601.h"
|
||||
#include "runtime/Context.h"
|
||||
#include "runtime/GlobalObject.h"
|
||||
|
||||
namespace Escargot {
|
||||
|
||||
#define CHECK_ICU() \
|
||||
if (U_FAILURE(status)) { \
|
||||
ErrorObject::throwBuiltinError(state, ErrorCode::TypeError, "failed to get value from ICU calendar"); \
|
||||
}
|
||||
|
||||
TemporalPlainYearMonthObject::TemporalPlainYearMonthObject(ExecutionState& state, Object* proto, ISO8601::PlainDate plainDate, Calendar calendar)
|
||||
: TemporalPlainDateObject(state, proto, plainDate, calendar)
|
||||
{
|
||||
}
|
||||
|
||||
TemporalPlainYearMonthObject::TemporalPlainYearMonthObject(ExecutionState& state, Object* proto, UCalendar* icuCalendar, Calendar calendar)
|
||||
: TemporalPlainDateObject(state, proto, icuCalendar, calendar)
|
||||
{
|
||||
}
|
||||
|
||||
String* TemporalPlainYearMonthObject::toString(ExecutionState& state, Value options)
|
||||
{
|
||||
auto resolvedOptions = Intl::getOptionsObject(state, options);
|
||||
auto showCalendar = Temporal::getTemporalShowCalendarNameOption(state, resolvedOptions);
|
||||
auto isoDate = computeISODate(state);
|
||||
StringBuilder builder;
|
||||
int32_t year = isoDate.year();
|
||||
int32_t month = isoDate.month();
|
||||
int32_t day = isoDate.day();
|
||||
|
||||
if (year > 9999 || year < 0) {
|
||||
builder.appendChar(year < 0 ? '-' : '+');
|
||||
auto s = pad('0', 6, std::to_string(std::abs(year)));
|
||||
builder.appendString(String::fromASCII(s.data(), s.length()));
|
||||
} else {
|
||||
auto s = pad('0', 4, std::to_string(std::abs(year)));
|
||||
builder.appendString(String::fromASCII(s.data(), s.length()));
|
||||
}
|
||||
|
||||
builder.appendChar('-');
|
||||
{
|
||||
auto s = pad('0', 2, std::to_string(month));
|
||||
builder.appendString(String::fromASCII(s.data(), s.length()));
|
||||
}
|
||||
|
||||
|
||||
if (showCalendar == TemporalShowCalendarNameOption::Always || showCalendar == TemporalShowCalendarNameOption::Critical || !calendarID().isISO8601()) {
|
||||
builder.appendChar('-');
|
||||
{
|
||||
auto s = pad('0', 2, std::to_string(day));
|
||||
builder.appendString(String::fromASCII(s.data(), s.length()));
|
||||
}
|
||||
}
|
||||
|
||||
Temporal::formatCalendarAnnotation(builder, m_calendarID, showCalendar);
|
||||
|
||||
return builder.finalize();
|
||||
}
|
||||
|
||||
} // namespace Escargot
|
||||
|
||||
#endif
|
||||
52
src/runtime/TemporalPlainYearMonthObject.h
Normal file
52
src/runtime/TemporalPlainYearMonthObject.h
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
#if defined(ENABLE_TEMPORAL)
|
||||
/*
|
||||
* Copyright (c) 2025-present Samsung Electronics Co., Ltd
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
* USA
|
||||
*/
|
||||
|
||||
#ifndef __EscargotTemporalPlainYearMonthObject__
|
||||
#define __EscargotTemporalPlainYearMonthObject__
|
||||
|
||||
#include "runtime/TemporalPlainDateObject.h"
|
||||
|
||||
namespace Escargot {
|
||||
|
||||
class TemporalPlainYearMonthObject : public TemporalPlainDateObject {
|
||||
public:
|
||||
TemporalPlainYearMonthObject(ExecutionState& state, Object* proto, ISO8601::PlainDate plainYearMonth, Calendar calendar);
|
||||
TemporalPlainYearMonthObject(ExecutionState& state, Object* proto, UCalendar* icuCalendar, Calendar calendar);
|
||||
|
||||
virtual bool isTemporalPlainDateObject() const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool isTemporalPlainYearMonthObject() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.tostring
|
||||
String* toString(ExecutionState& state, Value options);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
} // namespace Escargot
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -1274,7 +1274,7 @@ static Optional<PlainDate> parseDate(ParserString& buffer, bool parseYear = true
|
|||
|
||||
int32_t year = 0;
|
||||
unsigned month = 0;
|
||||
unsigned day = 0;
|
||||
unsigned day = 1;
|
||||
|
||||
bool splitByHyphen = false;
|
||||
if (parseYear) {
|
||||
|
|
|
|||
|
|
@ -99,6 +99,10 @@ inline Optional<DateTimeUnit> toDateTimeUnit(Optional<String*> s)
|
|||
F(month, Month) \
|
||||
F(day, Day)
|
||||
|
||||
#define PLAIN_YEARMONTH_UNITS(F) \
|
||||
F(year, Year) \
|
||||
F(month, Month)
|
||||
|
||||
#define PLAIN_TIME_UNITS(F) \
|
||||
F(hour, Hour) \
|
||||
F(minute, Minute) \
|
||||
|
|
@ -491,7 +495,7 @@ static_assert(sizeof(PlainDate) == sizeof(int32_t), "");
|
|||
|
||||
class PlainYearMonth {
|
||||
public:
|
||||
PlainYearMonth(int32_t y, int32_t m)
|
||||
PlainYearMonth(int32_t y = 0, int32_t m = 0)
|
||||
: m_year(y)
|
||||
, m_month(m)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1421,14 +1421,11 @@
|
|||
<test id="built-ins/Temporal/PlainTime/prototype/with/plaintimelike-invalid"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainTime/throws-if-time-is-invalid"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/argument-invalid"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/basic"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/builtin"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/calendar-always"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/calendar-case-insensitive"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/calendar-invalid"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/calendar-invalid-iso-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/calendar-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/calendar-undefined"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/compare/argument-cast"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/compare/argument-propertybag-calendar-case-insensitive"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/compare/argument-propertybag-calendar-invalid-iso-string"><reason>TODO</reason></test>
|
||||
|
|
@ -1463,76 +1460,22 @@
|
|||
<test id="built-ins/Temporal/PlainYearMonth/compare/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/compare/use-internal-slots"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/compare/year-zero"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-object"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-plaindate"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-plainyearmonth"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-propertybag-calendar-case-insensitive"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-propertybag-calendar-invalid-iso-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-propertybag-calendar-iso-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-propertybag-calendar-leap-second"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-propertybag-calendar-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-propertybag-calendar-year-zero"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-string-calendar-annotation"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-string-calendar-annotation-invalid-key"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-string-critical-unknown-annotation"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-string-date-with-utc-offset"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-string-invalid"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-string-limits"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-string-minus-sign"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-string-multiple-calendar"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-string-multiple-time-zone"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-string-time-separators"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-string-time-zone-annotation"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-string-trailing-junk"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-string-unknown-annotation"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-string-with-utc-designator"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/argument-wrong-type"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/basic"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/builtin"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/calendar-temporal-object"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/infinity-throws-rangeerror"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/leap-second"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/length"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/limits"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/missing-properties"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/monthcode-invalid"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/name"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/not-a-constructor"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/observable-get-overflow-argument-primitive"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/observable-get-overflow-argument-string-invalid"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/one-of-era-erayear-undefined"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/options-invalid"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/options-object"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/options-undefined"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/options-wrong-type"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/order-of-operations"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/overflow-constrain"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/overflow-invalid-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/overflow-reject"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/overflow-undefined"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/overflow-wrong-type"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/reference-day"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/subclassing-ignored"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/from/year-zero"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/get-prototype-from-constructor-throws"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/infinity-throws-rangeerror"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/length"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/limits"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/missing-arguments"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/name"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/negative-infinity-throws-rangeerror"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/argument-duration-max"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/argument-duration-object"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/argument-duration-out-of-range"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/argument-invalid-property"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/argument-lower-units"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/argument-mixed-sign"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/argument-not-object"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/argument-object"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/argument-singular-properties"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/argument-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/argument-string-negative-fractional-units"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/branding"><reason>TODO</reason></test>
|
||||
|
|
@ -1546,9 +1489,7 @@
|
|||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/negative-infinity-throws-rangeerror"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/non-integer-throws-rangeerror"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/not-a-constructor"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/options-invalid"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/options-object"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/options-wrong-type"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/order-of-operations"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/overflow-invalid-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/overflow-undefined"><reason>TODO</reason></test>
|
||||
|
|
@ -1557,23 +1498,12 @@
|
|||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/subclassing-ignored"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/subtract-from-last-representable-month"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/add/throws-if-year-outside-valid-iso-range"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/calendarId/branding"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/calendarId/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/constructor"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/daysInMonth/basic"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/daysInMonth/branding"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/daysInMonth/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/daysInYear/basic"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/daysInYear/branding"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/daysInYear/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/equals/argument-cast"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/equals/argument-number"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/equals/argument-propertybag-calendar-case-insensitive"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/equals/argument-propertybag-calendar-invalid-iso-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/equals/argument-propertybag-calendar-iso-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/equals/argument-propertybag-calendar-leap-second"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/equals/argument-propertybag-calendar-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/equals/argument-propertybag-calendar-wrong-type"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/equals/argument-propertybag-calendar-year-zero"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/equals/argument-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/equals/argument-string-calendar-annotation"><reason>TODO</reason></test>
|
||||
|
|
@ -1603,29 +1533,12 @@
|
|||
<test id="built-ins/Temporal/PlainYearMonth/prototype/equals/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/equals/use-internal-slots"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/equals/year-zero"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/era/branding"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/era/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/eraYear/branding"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/eraYear/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/inLeapYear/basic"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/inLeapYear/branding"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/inLeapYear/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/month/branding"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/month/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/monthCode/branding"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/monthCode/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/monthsInYear/basic"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/monthsInYear/branding"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/monthsInYear/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/argument-casting"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/argument-number"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/argument-propertybag-calendar-case-insensitive"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/argument-propertybag-calendar-invalid-iso-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/argument-propertybag-calendar-iso-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/argument-propertybag-calendar-leap-second"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/argument-propertybag-calendar-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/argument-propertybag-calendar-wrong-type"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/argument-propertybag-calendar-year-zero"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/argument-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/argument-string-calendar-annotation"><reason>TODO</reason></test>
|
||||
|
|
@ -1642,7 +1555,6 @@
|
|||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/argument-string-unknown-annotation"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/argument-string-with-utc-designator"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/argument-wrong-type"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/arguments-missing-throws"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/branding"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/builtin"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/builtin-calendar-no-array-iteration"><reason>TODO</reason></test>
|
||||
|
|
@ -1661,10 +1573,8 @@
|
|||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/length"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/name"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/not-a-constructor"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/options-invalid"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/options-object"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/options-undefined"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/options-wrong-type"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/order-of-operations"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/since/round-cross-unit-boundary"><reason>TODO</reason></test>
|
||||
|
|
@ -1697,12 +1607,10 @@
|
|||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/argument-duration-max"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/argument-duration-object"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/argument-duration-out-of-range"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/argument-invalid-property"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/argument-lower-units"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/argument-mixed-sign"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/argument-not-object"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/argument-object"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/argument-singular-properties"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/argument-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/argument-string-negative-fractional-units"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/branding"><reason>TODO</reason></test>
|
||||
|
|
@ -1717,9 +1625,7 @@
|
|||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/negative-infinity-throws-rangeerror"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/non-integer-throws-rangeerror"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/not-a-constructor"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/options-invalid"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/options-object"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/options-wrong-type"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/order-of-operations"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/overflow-invalid-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/overflow-undefined"><reason>TODO</reason></test>
|
||||
|
|
@ -1728,22 +1634,6 @@
|
|||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/subclassing-ignored"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/subtract-from-last-representable-month"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/subtract/throws-if-year-outside-valid-iso-range"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toJSON/basic"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toJSON/branding"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toJSON/builtin"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toJSON/length"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toJSON/name"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toJSON/not-a-constructor"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toJSON/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toJSON/year-format"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toLocaleString/branding"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toLocaleString/builtin"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toLocaleString/length"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toLocaleString/name"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toLocaleString/not-a-constructor"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toLocaleString/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toLocaleString/return-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toPlainDate/argument-not-object"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toPlainDate/basic"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toPlainDate/branding"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toPlainDate/builtin"><reason>TODO</reason></test>
|
||||
|
|
@ -1754,32 +1644,12 @@
|
|||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toPlainDate/name"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toPlainDate/not-a-constructor"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toPlainDate/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toString/branding"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toString/builtin"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toString/calendarname-always"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toString/calendarname-auto"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toString/calendarname-critical"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toString/calendarname-invalid-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toString/calendarname-never"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toString/calendarname-undefined"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toString/calendarname-wrong-type"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toString/length"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toString/name"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toString/not-a-constructor"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toString/options-object"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toString/options-wrong-type"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toString/order-of-operations"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toString/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toString/year-format"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/toStringTag/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/argument-casting"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/argument-number"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/argument-propertybag-calendar-case-insensitive"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/argument-propertybag-calendar-invalid-iso-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/argument-propertybag-calendar-iso-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/argument-propertybag-calendar-leap-second"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/argument-propertybag-calendar-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/argument-propertybag-calendar-wrong-type"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/argument-propertybag-calendar-year-zero"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/argument-string"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/argument-string-calendar-annotation"><reason>TODO</reason></test>
|
||||
|
|
@ -1796,7 +1666,6 @@
|
|||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/argument-string-unknown-annotation"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/argument-string-with-utc-designator"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/argument-wrong-type"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/arguments-missing-throws"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/branding"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/builtin"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/calendar-temporal-object"><reason>TODO</reason></test>
|
||||
|
|
@ -1814,10 +1683,8 @@
|
|||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/length"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/name"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/not-a-constructor"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/options-invalid"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/options-object"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/options-undefined"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/options-wrong-type"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/order-of-operations"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/round-cross-unit-boundary"><reason>TODO</reason></test>
|
||||
|
|
@ -1846,16 +1713,6 @@
|
|||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/throws-if-rounded-date-outside-valid-iso-range"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/throws-if-year-outside-valid-iso-range"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/until/year-zero"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/valueOf/basic"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/valueOf/branding"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/valueOf/builtin"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/valueOf/length"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/valueOf/name"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/valueOf/not-a-constructor"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/valueOf/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/with/argument-calendar-field"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/with/argument-missing-fields"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/with/argument-timezone-field"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/with/basic"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/with/branding"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/with/builtin"><reason>TODO</reason></test>
|
||||
|
|
@ -1874,10 +1731,6 @@
|
|||
<test id="built-ins/Temporal/PlainYearMonth/prototype/with/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/with/subclassing-ignored"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/with/yearmonthlike-invalid"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/year/branding"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/prototype/year/prop-desc"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/refisoday-undefined"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/PlainYearMonth/subclass"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/ZonedDateTime/builtin"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/ZonedDateTime/calendar-case-insensitive"><reason>TODO</reason></test>
|
||||
<test id="built-ins/Temporal/ZonedDateTime/calendar-invalid-iso-string"><reason>TODO</reason></test>
|
||||
|
|
@ -2878,13 +2731,8 @@
|
|||
<test id="intl402/Temporal/PlainYearMonth/compare/compare-calendar"><reason>TODO</reason></test>
|
||||
<test id="intl402/Temporal/PlainYearMonth/compare/exhaustive"><reason>TODO</reason></test>
|
||||
<test id="intl402/Temporal/PlainYearMonth/compare/infinity-throws-rangeerror"><reason>TODO</reason></test>
|
||||
<test id="intl402/Temporal/PlainYearMonth/from/argument-object"><reason>TODO</reason></test>
|
||||
<test id="intl402/Temporal/PlainYearMonth/from/calendar-not-supporting-eras"><reason>TODO</reason></test>
|
||||
<test id="intl402/Temporal/PlainYearMonth/from/canonicalize-calendar"><reason>TODO</reason></test>
|
||||
<test id="intl402/Temporal/PlainYearMonth/from/canonicalize-era-codes"><reason>TODO</reason></test>
|
||||
<test id="intl402/Temporal/PlainYearMonth/from/infinity-throws-rangeerror"><reason>TODO</reason></test>
|
||||
<test id="intl402/Temporal/PlainYearMonth/from/reference-day-chinese"><reason>TODO</reason></test>
|
||||
<test id="intl402/Temporal/PlainYearMonth/from/reference-day-gregory"><reason>TODO</reason></test>
|
||||
<test id="intl402/Temporal/PlainYearMonth/from/reference-day-hebrew"><reason>TODO</reason></test>
|
||||
<test id="intl402/Temporal/PlainYearMonth/from/remapping-era"><reason>TODO</reason></test>
|
||||
<test id="intl402/Temporal/PlainYearMonth/prototype/add/options-undefined"><reason>TODO</reason></test>
|
||||
|
|
@ -3654,7 +3502,6 @@
|
|||
<test id="staging/Temporal/Regex/old/instant"><reason>TODO</reason></test>
|
||||
<test id="staging/Temporal/Regex/old/plaindatetime"><reason>TODO</reason></test>
|
||||
<test id="staging/Temporal/Regex/old/plainmonthday"><reason>TODO</reason></test>
|
||||
<test id="staging/Temporal/Regex/old/plainyearmonth"><reason>TODO</reason></test>
|
||||
<test id="staging/Temporal/removed-methods"><reason>TODO</reason></test>
|
||||
<test id="staging/built-ins/Object/preventExtensions/preventExtensions-variable-length-typed-arrays"><reason>TODO</reason></test>
|
||||
<test id="staging/built-ins/Object/seal/seal-variable-length-typed-arrays"><reason>TODO</reason></test>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue