|
@@ -34,60 +34,60 @@ void ZonedDateTimePrototype::initialize(Realm& realm)
|
|
|
// 6.3.2 Temporal.ZonedDateTime.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype-@@tostringtag
|
|
|
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Temporal.ZonedDateTime"), Attribute::Configurable);
|
|
|
|
|
|
- define_native_accessor(vm.names.calendar, calendar_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.timeZone, time_zone_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.year, year_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.month, month_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.monthCode, month_code_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.day, day_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.hour, hour_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.minute, minute_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.second, second_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.millisecond, millisecond_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.microsecond, microsecond_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.nanosecond, nanosecond_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.epochSeconds, epoch_seconds_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.epochMilliseconds, epoch_milliseconds_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.epochMicroseconds, epoch_microseconds_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.epochNanoseconds, epoch_nanoseconds_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.dayOfWeek, day_of_week_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.dayOfYear, day_of_year_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.weekOfYear, week_of_year_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.hoursInDay, hours_in_day_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.daysInWeek, days_in_week_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.daysInMonth, days_in_month_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.daysInYear, days_in_year_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.monthsInYear, months_in_year_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.inLeapYear, in_leap_year_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.offsetNanoseconds, offset_nanoseconds_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.offset, offset_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.era, era_getter, {}, Attribute::Configurable);
|
|
|
- define_native_accessor(vm.names.eraYear, era_year_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.calendar, calendar_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.timeZone, time_zone_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.year, year_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.month, month_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.monthCode, month_code_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.day, day_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.hour, hour_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.minute, minute_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.second, second_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.millisecond, millisecond_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.microsecond, microsecond_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.nanosecond, nanosecond_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.epochSeconds, epoch_seconds_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.epochMilliseconds, epoch_milliseconds_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.epochMicroseconds, epoch_microseconds_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.epochNanoseconds, epoch_nanoseconds_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.dayOfWeek, day_of_week_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.dayOfYear, day_of_year_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.weekOfYear, week_of_year_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.hoursInDay, hours_in_day_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.daysInWeek, days_in_week_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.daysInMonth, days_in_month_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.daysInYear, days_in_year_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.monthsInYear, months_in_year_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.inLeapYear, in_leap_year_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.offsetNanoseconds, offset_nanoseconds_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.offset, offset_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.era, era_getter, {}, Attribute::Configurable);
|
|
|
+ define_native_accessor(realm, vm.names.eraYear, era_year_getter, {}, Attribute::Configurable);
|
|
|
|
|
|
u8 attr = Attribute::Writable | Attribute::Configurable;
|
|
|
- define_native_function(vm.names.with, with, 1, attr);
|
|
|
- define_native_function(vm.names.withPlainTime, with_plain_time, 0, attr);
|
|
|
- define_native_function(vm.names.withPlainDate, with_plain_date, 1, attr);
|
|
|
- define_native_function(vm.names.withTimeZone, with_time_zone, 1, attr);
|
|
|
- define_native_function(vm.names.withCalendar, with_calendar, 1, attr);
|
|
|
- define_native_function(vm.names.add, add, 1, attr);
|
|
|
- define_native_function(vm.names.subtract, subtract, 1, attr);
|
|
|
- define_native_function(vm.names.until, until, 1, attr);
|
|
|
- define_native_function(vm.names.since, since, 1, attr);
|
|
|
- define_native_function(vm.names.round, round, 1, attr);
|
|
|
- define_native_function(vm.names.equals, equals, 1, attr);
|
|
|
- define_native_function(vm.names.toString, to_string, 0, attr);
|
|
|
- define_native_function(vm.names.toLocaleString, to_locale_string, 0, attr);
|
|
|
- define_native_function(vm.names.toJSON, to_json, 0, attr);
|
|
|
- define_native_function(vm.names.valueOf, value_of, 0, attr);
|
|
|
- define_native_function(vm.names.startOfDay, start_of_day, 0, attr);
|
|
|
- define_native_function(vm.names.toInstant, to_instant, 0, attr);
|
|
|
- define_native_function(vm.names.toPlainDate, to_plain_date, 0, attr);
|
|
|
- define_native_function(vm.names.toPlainTime, to_plain_time, 0, attr);
|
|
|
- define_native_function(vm.names.toPlainDateTime, to_plain_date_time, 0, attr);
|
|
|
- define_native_function(vm.names.toPlainYearMonth, to_plain_year_month, 0, attr);
|
|
|
- define_native_function(vm.names.toPlainMonthDay, to_plain_month_day, 0, attr);
|
|
|
- define_native_function(vm.names.getISOFields, get_iso_fields, 0, attr);
|
|
|
+ define_native_function(realm, vm.names.with, with, 1, attr);
|
|
|
+ define_native_function(realm, vm.names.withPlainTime, with_plain_time, 0, attr);
|
|
|
+ define_native_function(realm, vm.names.withPlainDate, with_plain_date, 1, attr);
|
|
|
+ define_native_function(realm, vm.names.withTimeZone, with_time_zone, 1, attr);
|
|
|
+ define_native_function(realm, vm.names.withCalendar, with_calendar, 1, attr);
|
|
|
+ define_native_function(realm, vm.names.add, add, 1, attr);
|
|
|
+ define_native_function(realm, vm.names.subtract, subtract, 1, attr);
|
|
|
+ define_native_function(realm, vm.names.until, until, 1, attr);
|
|
|
+ define_native_function(realm, vm.names.since, since, 1, attr);
|
|
|
+ define_native_function(realm, vm.names.round, round, 1, attr);
|
|
|
+ define_native_function(realm, vm.names.equals, equals, 1, attr);
|
|
|
+ define_native_function(realm, vm.names.toString, to_string, 0, attr);
|
|
|
+ define_native_function(realm, vm.names.toLocaleString, to_locale_string, 0, attr);
|
|
|
+ define_native_function(realm, vm.names.toJSON, to_json, 0, attr);
|
|
|
+ define_native_function(realm, vm.names.valueOf, value_of, 0, attr);
|
|
|
+ define_native_function(realm, vm.names.startOfDay, start_of_day, 0, attr);
|
|
|
+ define_native_function(realm, vm.names.toInstant, to_instant, 0, attr);
|
|
|
+ define_native_function(realm, vm.names.toPlainDate, to_plain_date, 0, attr);
|
|
|
+ define_native_function(realm, vm.names.toPlainTime, to_plain_time, 0, attr);
|
|
|
+ define_native_function(realm, vm.names.toPlainDateTime, to_plain_date_time, 0, attr);
|
|
|
+ define_native_function(realm, vm.names.toPlainYearMonth, to_plain_year_month, 0, attr);
|
|
|
+ define_native_function(realm, vm.names.toPlainMonthDay, to_plain_month_day, 0, attr);
|
|
|
+ define_native_function(realm, vm.names.getISOFields, get_iso_fields, 0, attr);
|
|
|
}
|
|
|
|
|
|
// 6.3.3 get Temporal.ZonedDateTime.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.calendar
|