Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cfda643c04c033a07680a3afe4574cadb8f64451
      
https://github.com/WebKit/WebKit/commit/cfda643c04c033a07680a3afe4574cadb8f64451
  Author: Ithril <[email protected]>
  Date:   2026-07-15 (Wed, 15 Jul 2026)

  Changed paths:
    A JSTests/stress/temporal-non-iso-dayofyear.js
    M Source/JavaScriptCore/runtime/TemporalPlainDatePrototype.cpp
    M Source/JavaScriptCore/runtime/TemporalPlainDateTimePrototype.cpp
    M Source/JavaScriptCore/runtime/TemporalZonedDateTimePrototype.cpp
    M Source/JavaScriptCore/runtime/temporal/core/CalendarICUBridge.cpp
    M Source/JavaScriptCore/runtime/temporal/core/CalendarICUBridge.h

  Log Message:
  -----------
  [JSC][Temporal] Fix non-ISO calendar dayOfYear
https://bugs.webkit.org/show_bug.cgi?id=319305

Reviewed by Yijia Huang.

Temporal dayOfYear currently returns the ISO ordinal day for every calendar.
Read UCAL_DAY_OF_YEAR through CalendarICUBridge for non-ISO calendars and use
the existing proleptic Gregorian arithmetic path where required. This fixes
PlainDate, PlainDateTime, and ZonedDateTime for non-ISO calendars.

Test: JSTests/stress/temporal-non-iso-dayofyear.js

* JSTests/stress/temporal-non-iso-dayofyear.js:
Added coverage for non-ISO calendar dayOfYear values and Gregorian arithmetic
boundaries.

* Source/JavaScriptCore/runtime/TemporalPlainDatePrototype.cpp:
(JSC::temporalPlainDatePrototypeGetterDayOfYear):
* Source/JavaScriptCore/runtime/TemporalPlainDateTimePrototype.cpp:
(JSC::temporalPlainDateTimePrototypeGetterDayOfYear):
* Source/JavaScriptCore/runtime/TemporalZonedDateTimePrototype.cpp:
(JSC::temporalZonedDateTimePrototypeGetterDayOfYear):
Use CalendarICUBridge for non-ISO calendar dayOfYear values.

* Source/JavaScriptCore/runtime/temporal/core/CalendarICUBridge.cpp:
(JSC::TemporalCore::japaneseCalendarGregorianTransitionYear):
(JSC::TemporalCore::calendarDayOfYear):
Add the day-of-year bridge and name the Japanese Gregorian transition year.

* Source/JavaScriptCore/runtime/temporal/core/CalendarICUBridge.h:
(JSC::TemporalCore::calendarDayOfYear):
Declare the bridge.

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



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

Reply via email to