diff options
3 files changed, 3 insertions, 6 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp index 194920a02d..ba028ce7dd 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp @@ -343,7 +343,7 @@ ThrowCompletionOr<Value> calendar_days_in_week(VM& vm, Object& calendar, Object& } // 12.2.17 CalendarDaysInMonth ( calendar, dateLike ), https://tc39.es/proposal-temporal/#sec-temporal-calendardaysinmonth -ThrowCompletionOr<Value> calendar_days_in_month(VM& vm, Object& calendar, Object& date_like) +ThrowCompletionOr<double> calendar_days_in_month(VM& vm, Object& calendar, Object& date_like) { // 1. Assert: Type(calendar) is Object. diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.h b/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.h index d0f7792197..42bb460791 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.h @@ -55,7 +55,7 @@ ThrowCompletionOr<Value> calendar_day_of_year(VM&, Object& calendar, Object& dat ThrowCompletionOr<Value> calendar_week_of_year(VM&, Object& calendar, Object& date_like); ThrowCompletionOr<Value> calendar_year_of_week(VM&, Object& calendar, Object& date_like); ThrowCompletionOr<Value> calendar_days_in_week(VM&, Object& calendar, Object& date_like); -ThrowCompletionOr<Value> calendar_days_in_month(VM&, Object& calendar, Object& date_like); +ThrowCompletionOr<double> calendar_days_in_month(VM&, Object& calendar, Object& date_like); ThrowCompletionOr<Value> calendar_days_in_year(VM&, Object& calendar, Object& date_like); ThrowCompletionOr<Value> calendar_months_in_year(VM&, Object& calendar, Object& date_like); ThrowCompletionOr<Value> calendar_in_leap_year(VM&, Object& calendar, Object& date_like); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp index ae193cf14e..b429c5cfe4 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp @@ -324,10 +324,7 @@ ThrowCompletionOr<PlainYearMonth*> add_duration_to_or_subtract_duration_from_pla // 9. If sign < 0, then if (sign < 0) { // a. Let dayFromCalendar be ? CalendarDaysInMonth(calendar, yearMonth). - auto day_from_calendar = TRY(calendar_days_in_month(vm, calendar, year_month)); - - // b. Let day be ? ToPositiveInteger(dayFromCalendar). - day = TRY(to_positive_integer(vm, day_from_calendar)); + day = TRY(calendar_days_in_month(vm, calendar, year_month)); } // 10. Else, else { |