mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +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
|
@ -365,8 +365,8 @@ ThrowCompletionOr<GC::Ref<Duration>> difference_temporal_plain_date(VM& vm, Dura
|
|||
// 6. Let dateDifference be CalendarDateUntil(temporalDate.[[Calendar]], temporalDate.[[ISODate]], other.[[ISODate]], settings.[[LargestUnit]]).
|
||||
auto date_difference = calendar_date_until(vm, temporal_date.calendar(), temporal_date.iso_date(), other->iso_date(), settings.largest_unit);
|
||||
|
||||
// 7. Let duration be ! CombineDateAndTimeDuration(dateDifference, 0).
|
||||
auto duration = MUST(combine_date_and_time_duration(vm, date_difference, TimeDuration { 0 }));
|
||||
// 7. Let duration be CombineDateAndTimeDuration(dateDifference, 0).
|
||||
auto duration = combine_date_and_time_duration(date_difference, TimeDuration { 0 });
|
||||
|
||||
// 8. If settings.[[SmallestUnit]] is not DAY or settings.[[RoundingIncrement]] ≠ 1, then
|
||||
if (settings.smallest_unit != Unit::Day || settings.rounding_increment != 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue