Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 995317a481da0eb89e2ea4d03e3ffddd8e8b9082
      
https://github.com/WebKit/WebKit/commit/995317a481da0eb89e2ea4d03e3ffddd8e8b9082
  Author: Tim Chevalier <[email protected]>
  Date:   2025-10-04 (Sat, 04 Oct 2025)

  Changed paths:
    M JSTests/stress/temporal-plaindate.js
    M JSTests/test262/config.yaml
    M JSTests/test262/expectations.yaml
    M Source/JavaScriptCore/runtime/ISO8601.cpp
    M Source/JavaScriptCore/runtime/ISO8601.h
    M Source/JavaScriptCore/runtime/TemporalCalendar.cpp
    M Source/JavaScriptCore/runtime/TemporalCalendar.h
    M Source/JavaScriptCore/runtime/TemporalCalendarPrototype.cpp
    M Source/JavaScriptCore/runtime/TemporalDuration.cpp
    M Source/JavaScriptCore/runtime/TemporalDuration.h
    M Source/JavaScriptCore/runtime/TemporalObject.h
    M Source/JavaScriptCore/runtime/TemporalPlainDate.cpp
    M Source/JavaScriptCore/runtime/TemporalPlainDate.h

  Log Message:
  -----------
  [Temporal] Remove isoDateDifference() and use calendarDateUntil() instead
https://bugs.webkit.org/show_bug.cgi?id=298564

Reviewed by Yusuke Suzuki.

This affects the implementations of TemporalPlainDate::since() and
TemporalPlainDate::until(), and enables some of the previously-failing tests
for those methods.

Also adds roundRelativeDuration() and its auxiliary functions
(nudgeToCalendarUnit(), nudgeToDayOrTime(), bubbleRelativeDuration()),
as this is required by calendarDateUntil().

Also fixes a bug where an out-of-range year could be passed
in to the PlainDate constructor, resulting in integer overflow.

* JSTests/stress/temporal-plaindate.js:
(shouldBe):
* JSTests/test262/config.yaml:
* JSTests/test262/expectations.yaml:
* Source/JavaScriptCore/runtime/ISO8601.cpp:
(JSC::ISO8601::parseDate):
(JSC::ISO8601::weekOfYear):
(JSC::ISO8601::createISODateRecord):
* Source/JavaScriptCore/runtime/ISO8601.h:
* Source/JavaScriptCore/runtime/TemporalCalendar.cpp:
(JSC::TemporalCalendar::balanceISODate):
(JSC::TemporalCalendar::isoDateAdd):
(JSC::TemporalCalendar::balanceISOYearMonth):
(JSC::dateDuration):
(JSC::isoDateSurpasses):
(JSC::TemporalCalendar::calendarDateUntil):
(JSC::TemporalCalendar::isoDateDifference): Deleted.
* Source/JavaScriptCore/runtime/TemporalCalendar.h:
* Source/JavaScriptCore/runtime/TemporalCalendarPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/TemporalDuration.cpp:
(JSC::adjustDateDurationRecord):
(JSC::combineISODateAndTimeRecord):
(JSC::getUTCEpochNanoseconds):
(JSC::getEpochNanosecondsFor):
(JSC::nudgeToCalendarUnit):
(JSC::nudgeToDayOrTime):
(JSC::unitIndexInTable):
(JSC::unitInTable):
(JSC::bubbleRelativeDuration):
(JSC::TemporalDuration::roundRelativeDuration):
* Source/JavaScriptCore/runtime/TemporalDuration.h:
* Source/JavaScriptCore/runtime/TemporalObject.h:
* Source/JavaScriptCore/runtime/TemporalPlainDate.cpp:
(JSC::TemporalPlainDate::toPlainDate):
(JSC::getUTCEpochNanoseconds):
(JSC::TemporalPlainDate::differenceTemporalPlainDate):
(JSC::TemporalPlainDate::until):
(JSC::TemporalPlainDate::since):
* Source/JavaScriptCore/runtime/TemporalPlainDate.h:

Canonical link: https://commits.webkit.org/301012@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to