Skip to content

Conversation

@catamorphism
Copy link
Contributor

@catamorphism catamorphism commented Oct 9, 2025

0675fe1

[Temporal] Implement toString, toJSON, and toLocaleString for PlainMonthDay
https://bugs.webkit.org/show_bug.cgi?id=300423

Reviewed by Yusuke Suzuki.

Implement these methods.

* JSTests/stress/temporal-plainmonthday.js:
(shouldThrow):
* JSTests/test262/config.yaml:
* Source/JavaScriptCore/runtime/CommonIdentifiers.h:
* Source/JavaScriptCore/runtime/ISO8601.cpp:
(JSC::ISO8601::temporalDateToString):
(JSC::ISO8601::temporalMonthDayToString):
* Source/JavaScriptCore/runtime/ISO8601.h:
* Source/JavaScriptCore/runtime/TemporalObject.cpp:
(JSC::toTemporalCalendarName):
* Source/JavaScriptCore/runtime/TemporalObject.h:
* Source/JavaScriptCore/runtime/TemporalPlainMonthDay.cpp:
(JSC::TemporalPlainMonthDay::toString const):
* Source/JavaScriptCore/runtime/TemporalPlainMonthDay.h:
* Source/JavaScriptCore/runtime/TemporalPlainMonthDayPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):

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

51b9ef8

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ❌ 🧪 wpe-wk2 💥 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 🧪 jsc-arm64 ✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 🛠 playstation
✅ 🛠 🧪 unsafe-merge ✅ 🛠 tv ✅ 🛠 mac-safer-cpp ✅ 🛠 jsc-armv7
✅ 🛠 tv-sim ✅ 🧪 jsc-armv7-tests
✅ 🛠 watch
✅ 🛠 watch-sim

@catamorphism catamorphism requested a review from a team as a code owner October 9, 2025 04:16
@catamorphism catamorphism self-assigned this Oct 9, 2025
@catamorphism catamorphism added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Oct 9, 2025
@catamorphism catamorphism force-pushed the plainmonthday-plainyearmonth-part-3 branch from 707a753 to ea2abf2 Compare October 9, 2025 04:19
return makeString(prefix, pad('0', yearDigits, year), '-', pad('0', 2, month));
}

static String temporalDateToString(double year, double month, double day)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking double is very concerning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in a499a53

}

String temporalDateToString(PlainDate plainDate)
static String temporalDateToString(double year, double month)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto. It should be integers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in a499a53

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Oct 9, 2025
@catamorphism catamorphism force-pushed the plainmonthday-plainyearmonth-part-3 branch from a499a53 to 123be95 Compare October 10, 2025 04:05
@catamorphism catamorphism added request-merge-queue Request a pull request to be added to merge-queue once ready and removed merging-blocked Applied to prevent a change from being merged labels Oct 10, 2025
@catamorphism catamorphism force-pushed the plainmonthday-plainyearmonth-part-3 branch from 123be95 to 51b9ef8 Compare October 10, 2025 18:07
@Constellation Constellation added unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing and removed request-merge-queue Request a pull request to be added to merge-queue once ready labels Oct 12, 2025
…nthDay

https://bugs.webkit.org/show_bug.cgi?id=300423

Reviewed by Yusuke Suzuki.

Implement these methods.

* JSTests/stress/temporal-plainmonthday.js:
(shouldThrow):
* JSTests/test262/config.yaml:
* Source/JavaScriptCore/runtime/CommonIdentifiers.h:
* Source/JavaScriptCore/runtime/ISO8601.cpp:
(JSC::ISO8601::temporalDateToString):
(JSC::ISO8601::temporalMonthDayToString):
* Source/JavaScriptCore/runtime/ISO8601.h:
* Source/JavaScriptCore/runtime/TemporalObject.cpp:
(JSC::toTemporalCalendarName):
* Source/JavaScriptCore/runtime/TemporalObject.h:
* Source/JavaScriptCore/runtime/TemporalPlainMonthDay.cpp:
(JSC::TemporalPlainMonthDay::toString const):
* Source/JavaScriptCore/runtime/TemporalPlainMonthDay.h:
* Source/JavaScriptCore/runtime/TemporalPlainMonthDayPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):

Canonical link: https://commits.webkit.org/301375@main
@webkit-commit-queue webkit-commit-queue force-pushed the plainmonthday-plainyearmonth-part-3 branch from 51b9ef8 to 0675fe1 Compare October 12, 2025 02:20
@webkit-commit-queue
Copy link
Collaborator

Committed 301375@main (0675fe1): https://commits.webkit.org/301375@main

Reviewed commits have been landed. Closing PR #52042 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 0675fe1 into WebKit:main Oct 12, 2025
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Oct 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants