Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e07ecf4c4a07c61d5c331dfe900266ee50785cdf
      
https://github.com/WebKit/WebKit/commit/e07ecf4c4a07c61d5c331dfe900266ee50785cdf
  Author: Yijia Huang <[email protected]>
  Date:   2026-08-07 (Fri, 07 Aug 2026)

  Changed paths:
    M Source/JavaScriptCore/runtime/ISO8601.cpp
    M Source/JavaScriptCore/runtime/ISO8601.h
    M Source/JavaScriptCore/runtime/TemporalZonedDateTime.cpp
    M Source/JavaScriptCore/runtime/TemporalZonedDateTime.h
    M Source/JavaScriptCore/runtime/temporal/core/CalendarICUBridge.cpp

  Log Message:
  -----------
  [JSC][Temporal] Replace the four monthCode search walks with one primitive
https://bugs.webkit.org/show_bug.cgi?id=321313
rdar://184352721

Reviewed by Yusuke Suzuki.

setCalendarToMonthCode walked the months of a calendar year twice, once for
Hebrew and once for everything else, and resolveMonthCodeToOrdinal and
nonISOCalendarDateToISO each walked once more: four loops in three functions.
searchYearForMonthCode does it once and reports where it stopped and why,
leaving each caller its own constrain rule and its own answer to give. The
constrain rule is the part that genuinely differed: Hebrew M05L (Adar I)
constrains forward to M06, every other calendar backward.

No behaviour change. Hebrew's forward constrain is now guarded on the overshoot
stop it applies to — M05L is the only monthCode that can be absent from a Hebrew
year — so a walk that leaves the year rewinds like every other calendar.

calendarYear now reaches ICU through withCalendarSetToDate and readICUField like
the rest of the accessor family.

parseUTCOffset and parseTimeSpec take SubMinutePrecision instead of a bool,
naming the UTCOffset[SubMinutePrecision] grammar parameter, and TimeZoneRecord
becomes ISOStringTimeZoneParseRecord after the record it implements.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to