1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:57:35 +00:00

LibJS: Use TimeZoneMethods in DisambiguatePossibleInstants

This commit partially updates the DisambiguatePossibleInstants AO to use
a time zone methods record in line with the latest spec.
This commit is contained in:
Shannon Booth 2024-03-02 20:21:45 +13:00 committed by Andreas Kling
parent f95117f75d
commit cb1c3e5ea5
3 changed files with 34 additions and 31 deletions

View file

@ -113,7 +113,7 @@ ThrowCompletionOr<BigInt const*> interpret_iso_date_time_offset(VM& vm, i32 year
return vm.throw_completion<RangeError>(ErrorType::TemporalInvalidZonedDateTimeOffset);
// 10. Let instant be ? DisambiguatePossibleInstants(possibleInstants, timeZone, dateTime, disambiguation).
auto instant = TRY(disambiguate_possible_instants(vm, possible_instants, time_zone, *date_time, disambiguation));
auto instant = TRY(disambiguate_possible_instants(vm, possible_instants, time_zone_record, *date_time, disambiguation));
// 11. Return instant.[[Nanoseconds]].
return &instant->nanoseconds();