mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibJS: Remove "era" from Temporal's DateTimeFormat formatting options
This is an editorial change in the Temporal proposal. See: https://github.com/tc39/proposal-temporal/commit/0ecf157 The test added here would previously throw: TypeError: Unable to determine format for Temporal.PlainDate
This commit is contained in:
Notes:
github-actions[bot]
2025-11-16 13:01:12 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/15e4deb831e Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6832
@@ -364,8 +364,8 @@ Optional<Unicode::CalendarPattern> get_date_time_format(Unicode::CalendarPattern
|
||||
// 13. Let anyPresent be false.
|
||||
auto any_present = false;
|
||||
|
||||
// 14. For each property name prop of « "weekday", "year", "month", "day", "era", "dayPeriod", "hour", "minute", "second", "fractionalSecondDigits" », do
|
||||
static constexpr auto all_fields = AK::Array { Weekday, Year, Month, Day, Era, DayPeriod, Hour, Minute, Second, FractionalSecondDigits };
|
||||
// 14. For each property name prop of « "weekday", "year", "month", "day", "dayPeriod", "hour", "minute", "second", "fractionalSecondDigits" », do
|
||||
static constexpr auto all_fields = AK::Array { Weekday, Year, Month, Day, DayPeriod, Hour, Minute, Second, FractionalSecondDigits };
|
||||
|
||||
options.for_each_calendar_field_zipped_with(format_options, all_fields, [&](auto const& option, auto&) {
|
||||
// a. If options.[[<prop>]] is not undefined, set anyPresent to true.
|
||||
|
||||
Reference in New Issue
Block a user