1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 10:47:35 +00:00

LibJS: Assume options is an object in the MergeLargestUnitOption AO

This is an editorial change in the Temporal spec.

See: 20a04ac
This commit is contained in:
Linus Groh 2022-06-15 00:47:40 +01:00
parent 569c2dc1d0
commit 52a4ee563d
6 changed files with 13 additions and 17 deletions

View file

@ -613,7 +613,7 @@ ThrowCompletionOr<Duration*> difference_temporal_zoned_date_time(GlobalObject& g
}
// 16. Let untilOptions be ? MergeLargestUnitOption(options, largestUnit).
auto* until_options = TRY(merge_largest_unit_option(global_object, options, *largest_unit));
auto* until_options = TRY(merge_largest_unit_option(global_object, *options, *largest_unit));
// 17. Let difference be ? DifferenceZonedDateTime(zonedDateTime.[[Nanoseconds]], other.[[Nanoseconds]], zonedDateTime.[[TimeZone]], zonedDateTime.[[Calendar]], largestUnit, untilOptions).
auto difference = TRY(difference_zoned_date_time(global_object, zoned_date_time.nanoseconds(), other->nanoseconds(), zoned_date_time.time_zone(), zoned_date_time.calendar(), *largest_unit, *until_options));