mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 01:32:14 -05:00
LibJS: Avoid negated test in DifferenceTemporalZonedDateTime
This is an editorial change in the Temporal proposal. See: https://github.com/tc39/proposal-temporal/commit/38233ae
This commit is contained in:
parent
5c0c1e507c
commit
81b38c66a8
Notes:
github-actions[bot]
2024-12-05 21:07:13 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/81b38c66a80 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2790 Reviewed-by: https://github.com/gmta ✅
1 changed files with 2 additions and 2 deletions
|
@ -542,8 +542,8 @@ ThrowCompletionOr<GC::Ref<Duration>> difference_temporal_zoned_date_time(VM& vm,
|
|||
// 4. Let settings be ? GetDifferenceSettings(operation, resolvedOptions, DATETIME, « », NANOSECOND, HOUR).
|
||||
auto settings = TRY(get_difference_settings(vm, operation, resolved_options, UnitGroup::DateTime, {}, Unit::Nanosecond, Unit::Hour));
|
||||
|
||||
// 5. If TemporalUnitCategory(settings.[[LargestUnit]]) is not DATE, then
|
||||
if (temporal_unit_category(settings.largest_unit) != UnitCategory::Date) {
|
||||
// 5. If TemporalUnitCategory(settings.[[LargestUnit]]) is TIME, then
|
||||
if (temporal_unit_category(settings.largest_unit) == UnitCategory::Time) {
|
||||
// a. Let internalDuration be DifferenceInstant(zonedDateTime.[[EpochNanoseconds]], other.[[EpochNanoseconds]], settings.[[RoundingIncrement]], settings.[[SmallestUnit]], settings.[[RoundingMode]]).
|
||||
auto internal_duration = difference_instant(vm, zoned_date_time.epoch_nanoseconds()->big_integer(), other->epoch_nanoseconds()->big_integer(), settings.rounding_increment, settings.smallest_unit, settings.rounding_mode);
|
||||
|
||||
|
|
Loading…
Reference in a new issue