Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 61c45636fa179d656ac263df70a9ba9d1580d698
https://github.com/WebKit/WebKit/commit/61c45636fa179d656ac263df70a9ba9d1580d698
Author: Chris Dumez <[email protected]>
Date: 2025-05-09 (Fri, 09 May 2025)
Changed paths:
M Source/JavaScriptCore/dfg/DFGOperations.cpp
M Source/JavaScriptCore/runtime/DateConversion.cpp
M Source/JavaScriptCore/runtime/DatePrototype.cpp
M Source/WTF/wtf/DateMath.cpp
M Source/WTF/wtf/DateMath.h
M Source/WTF/wtf/GregorianDateTime.cpp
M Source/WTF/wtf/GregorianDateTime.h
Log Message:
-----------
Use a strong type for weekday in GregorianDateTime
https://bugs.webkit.org/show_bug.cgi?id=292682
Reviewed by Darin Adler and Geoffrey Garen.
Use a strong type for weekday in GregorianDateTime instead of an int. It is
less error-prone and it removes ambiguity over whether 0 represents Monday
or Sunday. I wanted to use std::chrono::weekday but it is not yet available
in the playstation port's SDK. As a result, I am using an API-compatible
WTF::Weekday instead for now.
* Source/JavaScriptCore/dfg/DFGOperations.cpp:
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/runtime/DateConversion.cpp:
(JSC::formatDateTime):
* Source/JavaScriptCore/runtime/DatePrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/WTF/wtf/DateMath.cpp:
(WTF::weekdayName):
(WTF::makeRFC2822DateString):
* Source/WTF/wtf/DateMath.h:
(WTF::msToWeekDay):
(WTF::weekDay):
(WTF::equivalentYear):
* Source/WTF/wtf/GregorianDateTime.cpp:
(WTF::GregorianDateTime::setToCurrentLocalTime):
* Source/WTF/wtf/GregorianDateTime.h:
Canonical link: https://commits.webkit.org/294709@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