mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibJS: Mark TemporalDurationFromInternal as infallible in difference AOs
This is an editorial change in the Temporal proposal. See:
76c6612
This commit is contained in:
parent
81b38c66a8
commit
4f07cddb2d
Notes:
github-actions[bot]
2024-12-05 21:07:07 +00:00
Author: https://github.com/trflynn89
Commit: 4f07cddb2d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2790
Reviewed-by: https://github.com/gmta ✅
3 changed files with 6 additions and 6 deletions
|
@ -405,8 +405,8 @@ ThrowCompletionOr<GC::Ref<Duration>> difference_temporal_plain_date_time(VM& vm,
|
|||
// 6. Let internalDuration be ? DifferencePlainDateTimeWithRounding(dateTime.[[ISODateTime]], other.[[ISODateTime]], dateTime.[[Calendar]], settings.[[LargestUnit]], settings.[[RoundingIncrement]], settings.[[SmallestUnit]], settings.[[RoundingMode]]).
|
||||
auto internal_duration = TRY(difference_plain_date_time_with_rounding(vm, date_time.iso_date_time(), other->iso_date_time(), date_time.calendar(), settings.largest_unit, settings.rounding_increment, settings.smallest_unit, settings.rounding_mode));
|
||||
|
||||
// 7. Let result be ? TemporalDurationFromInternal(internalDuration, settings.[[LargestUnit]]).
|
||||
auto result = TRY(temporal_duration_from_internal(vm, internal_duration, settings.largest_unit));
|
||||
// 7. Let result be ! TemporalDurationFromInternal(internalDuration, settings.[[LargestUnit]]).
|
||||
auto result = MUST(temporal_duration_from_internal(vm, internal_duration, settings.largest_unit));
|
||||
|
||||
// 8. If operation is SINCE, set result to CreateNegatedTemporalDuration(result).
|
||||
if (operation == DurationOperation::Since)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue