mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibJS: Make CombineDateAndTimeDuration infallible
This is an editorial change in the Temporal proposal. See:
794960c
This commit is contained in:
parent
e29c6d2a80
commit
0e81092685
Notes:
github-actions[bot]
2024-12-05 21:06:37 +00:00
Author: https://github.com/trflynn89
Commit: 0e81092685
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2790
Reviewed-by: https://github.com/gmta ✅
9 changed files with 41 additions and 41 deletions
|
@ -241,8 +241,8 @@ ThrowCompletionOr<GC::Ref<Duration>> difference_temporal_plain_year_month(VM& vm
|
|||
// 14. Let yearsMonthsDifference be ! AdjustDateDurationRecord(dateDifference, 0, 0).
|
||||
auto years_months_difference = MUST(adjust_date_duration_record(vm, date_difference, 0, 0));
|
||||
|
||||
// 15. Let duration be ! CombineDateAndTimeDuration(yearsMonthsDifference, 0).
|
||||
auto duration = MUST(combine_date_and_time_duration(vm, years_months_difference, TimeDuration { 0 }));
|
||||
// 15. Let duration be CombineDateAndTimeDuration(yearsMonthsDifference, 0).
|
||||
auto duration = combine_date_and_time_duration(years_months_difference, TimeDuration { 0 });
|
||||
|
||||
// 16. If settings.[[SmallestUnit]] is not MONTH or settings.[[RoundingIncrement]] ≠ 1, then
|
||||
if (settings.smallest_unit != Unit::Month || settings.rounding_increment != 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue