summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-11-09 20:37:17 +0000
committerLinus Groh <mail@linusgroh.de>2021-11-09 20:37:17 +0000
commite9f66d1c2aa959d8f0a62fc23a6cf01a002d01f0 (patch)
treede8aa8249cde069f66892a32cd4c39f227198a9a /Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp
parent03c023d7e964c9910d8a45361d0477611bc99b8a (diff)
downloadserenity-e9f66d1c2aa959d8f0a62fc23a6cf01a002d01f0.zip
LibJS: Mark DaysUntil as infallible
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/30a8939
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp
index e192688673..7c2286c6fa 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp
@@ -453,7 +453,6 @@ ThrowCompletionOr<MoveRelativeDateResult> move_relative_date(GlobalObject& globa
// 4. Let later be ? CalendarDateAdd(calendar, relativeTo, duration, options).
auto* later = TRY(calendar_date_add(global_object, calendar, &relative_to, duration, options));
- // FIXME: This cannot return an abrupt completion (spec issue, see https://github.com/tc39/proposal-temporal/pull/1909)
// 5. Let days be ? DaysUntil(relativeTo, later).
auto days = days_until(global_object, relative_to, *later);
@@ -591,7 +590,6 @@ ThrowCompletionOr<RoundedDuration> round_duration(GlobalObject& global_object, d
// g. Let yearsMonthsWeeksLater be ? CalendarDateAdd(calendar, relativeTo, yearsMonthsWeeks, secondAddOptions, dateAdd).
auto* years_months_weeks_later = TRY(calendar_date_add(global_object, *calendar, relative_to, *years_months_weeks, second_add_options, date_add));
- // FIXME: This cannot return an abrupt completion (spec issue, see https://github.com/tc39/proposal-temporal/pull/1909)
// h. Let monthsWeeksInDays be ? DaysUntil(yearsLater, yearsMonthsWeeksLater).
auto months_weeks_in_days = days_until(global_object, *years_later, *years_months_weeks_later);
@@ -637,7 +635,6 @@ ThrowCompletionOr<RoundedDuration> round_duration(GlobalObject& global_object, d
// v. Set relativeTo to ? CalendarDateAdd(calendar, relativeTo, yearsDuration, fourthAddOptions, dateAdd).
relative_to_date = TRY(calendar_date_add(global_object, *calendar, relative_to_date, *years_duration, fourth_add_options, date_add));
- // FIXME: This cannot return an abrupt completion (spec issue, see https://github.com/tc39/proposal-temporal/pull/1909)
// w. Let daysPassed be ? DaysUntil(oldRelativeTo, relativeTo).
auto days_passed = days_until(global_object, *old_relative_to_date, *relative_to_date);
@@ -702,7 +699,6 @@ ThrowCompletionOr<RoundedDuration> round_duration(GlobalObject& global_object, d
// g. Let yearsMonthsWeeksLater be ? CalendarDateAdd(calendar, relativeTo, yearsMonthsWeeks, secondAddOptions, dateAdd).
auto* years_months_weeks_later = TRY(calendar_date_add(global_object, *calendar, relative_to, *years_months_weeks, seconds_add_options, date_add));
- // FIXME: This cannot return an abrupt completion (spec issue, see https://github.com/tc39/proposal-temporal/pull/1909)
// h. Let weeksInDays be ? DaysUntil(yearsMonthsLater, yearsMonthsWeeksLater).
auto weeks_in_days = days_until(global_object, *years_months_later, *years_months_weeks_later);