1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:47:37 +00:00

LibJS: Fix spec link and spec comment in PlainYearMonth

This commit is contained in:
BodilessSleeper 2022-12-30 20:01:41 +01:00 committed by Andreas Kling
parent 84db0c8dbf
commit c65df44eee

View file

@ -287,7 +287,7 @@ ThrowCompletionOr<Duration*> difference_temporal_plain_year_month(VM& vm, Differ
return MUST(create_temporal_duration(vm, sign * result.years, sign * result.months, 0, 0, 0, 0, 0, 0, 0, 0)); return MUST(create_temporal_duration(vm, sign * result.years, sign * result.months, 0, 0, 0, 0, 0, 0, 0, 0));
} }
// 9.5.8 AddDurationToOrSubtractDurationFromPlainYearMonth ( operation, yearMonth, temporalDurationLike, options ), https://tc39.es/proposal-temporal/#sec-temporal-addtemporalplainyearmonth // 9.5.8 AddDurationToOrSubtractDurationFromPlainYearMonth ( operation, yearMonth, temporalDurationLike, options ), https://tc39.es/proposal-temporal/#sec-temporal-adddurationtoorsubtractdurationfromplainyearmonth
ThrowCompletionOr<PlainYearMonth*> add_duration_to_or_subtract_duration_from_plain_year_month(VM& vm, ArithmeticOperation operation, PlainYearMonth& year_month, Value temporal_duration_like, Value options_value) ThrowCompletionOr<PlainYearMonth*> add_duration_to_or_subtract_duration_from_plain_year_month(VM& vm, ArithmeticOperation operation, PlainYearMonth& year_month, Value temporal_duration_like, Value options_value)
{ {
auto& realm = *vm.current_realm(); auto& realm = *vm.current_realm();
@ -323,7 +323,7 @@ ThrowCompletionOr<PlainYearMonth*> add_duration_to_or_subtract_duration_from_pla
// 9. If sign < 0, then // 9. If sign < 0, then
if (sign < 0) { if (sign < 0) {
// a. Let dayFromCalendar be ? CalendarDaysInMonth(calendar, yearMonth). // a. Let day be ? CalendarDaysInMonth(calendar, yearMonth).
day = TRY(calendar_days_in_month(vm, calendar, year_month)); day = TRY(calendar_days_in_month(vm, calendar, year_month));
} }
// 10. Else, // 10. Else,