Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 15fb1d899a7efc65333c8e6f6a7514f0a4eac2c2
      
https://github.com/WebKit/WebKit/commit/15fb1d899a7efc65333c8e6f6a7514f0a4eac2c2
  Author: Yijia Huang <[email protected]>
  Date:   2026-05-11 (Mon, 11 May 2026)

  Changed paths:
    M Source/JavaScriptCore/API/tests/TemporalCoreTest.cpp
    M Source/JavaScriptCore/CMakeLists.txt
    M Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
    M Source/JavaScriptCore/PlatformPlayStation.cmake
    M Source/JavaScriptCore/Sources.txt
    M Source/JavaScriptCore/runtime/ISO8601.cpp
    M Source/JavaScriptCore/runtime/ISO8601.h
    M Source/JavaScriptCore/runtime/IntlObject.cpp
    M Source/JavaScriptCore/runtime/IntlObject.h
    A Source/JavaScriptCore/runtime/temporal/core/CalendarICUBridge.cpp
    A Source/JavaScriptCore/runtime/temporal/core/CalendarICUBridge.h
    A Source/JavaScriptCore/runtime/temporal/core/ICUCalendarStubs.cpp
    A Source/JavaScriptCore/runtime/temporal/core/TimeZoneICUBridge.cpp
    A Source/JavaScriptCore/runtime/temporal/core/TimeZoneICUBridge.h

  Log Message:
  -----------
  [JSC][Temporal] Add ICU calendar and timezone bridge layer: 
CalendarICUBridge, TimeZoneICUBridge
https://bugs.webkit.org/show_bug.cgi?id=314532
rdar://176765786

Reviewed by Yusuke Suzuki.

Adds ICU-backed bridge for non-ISO calendar field access and timezone
operations, building on the pure C++ core layer from the previous commit.

CalendarICUBridge implements calendar field accessors (year, month, day,
era, monthCode, daysInMonth, etc.) for all 26 calendar systems. Calendars
are identified by CalendarID (unsigned index into intlAvailableCalendars()),
with calendarIDFromString/calendarIDToString for string conversion.
IntlObject.h adds FOR_EACH_CACHED_CALENDAR_ID, caching 17 named CalendarIDs
globally so calendarHasEras, calendarIsLunisolar, calendarIsIslamic and all
internal comparisons use integer equality instead of string comparisons.
The lunisolar path ports icu4x's ArithmeticDate::until and SurpassesChecker
for correct month counting. ecmaReferenceYear ports icu4x's CLDR-derived
reference year tables for PlainMonthDay in non-ISO calendars. Japanese era
mapping uses japaneseEraStartYear/japaneseEraCode to derive ICU era integers
from era start dates rather than hardcoding ICU's internal sequence numbers.
chineseCalendarUsesEpochOffset result is cached via magic static (depends
only on ICU version, fixed for process lifetime).

TimeZoneICUBridge implements GetNamedTimeZoneEpochNanoseconds (0/1/2
candidates for DST gap/normal/fold), GetOffsetNanosecondsFor,
GetNamedTimeZoneNextTransition/PreviousTransition, GetEpochNanosecondsFor,
DisambiguatePossibleEpochNanoseconds, and AddZonedDateTime. The DST gap
case returns GapOffsets (before/after bracket offsets), matching the
temporal_rs CandidateEpochNanoseconds Variant design.

ISO8601.cpp adds parseTemporalTimeZoneIdentifier (implements
ParseTemporalTimeZoneString) and parseTimeZoneForIdentifier (restricts
inline UTC offsets to ±HH:MM, no sub-minute precision).

ICUCalendarStubs.cpp provides PlayStation no-op stubs for write-side ICU APIs.

Test: Source/JavaScriptCore/API/tests/TemporalCoreTest.cpp
Canonical link: https://commits.webkit.org/313057@main



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

Reply via email to