diff --git a/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GenerateUnicodeDateTimeFormat.cpp b/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GenerateUnicodeDateTimeFormat.cpp index 0a42c0502e..0166e51fe5 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GenerateUnicodeDateTimeFormat.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GenerateUnicodeDateTimeFormat.cpp @@ -913,13 +913,13 @@ static void parse_calendar_symbols(Calendar& calendar, JsonObject const& calenda else if (key == "pm"sv) symbols[to_underlying(Unicode::DayPeriod::PM)] = locale_data.unique_strings.ensure(move(symbol)); else if (key == "morning1"sv) - symbols[to_underlying(Unicode::DayPeriod::Morning)] = locale_data.unique_strings.ensure(move(symbol)); + symbols[to_underlying(Unicode::DayPeriod::Morning1)] = locale_data.unique_strings.ensure(move(symbol)); else if (key == "afternoon1"sv) - symbols[to_underlying(Unicode::DayPeriod::Afternoon)] = locale_data.unique_strings.ensure(move(symbol)); + symbols[to_underlying(Unicode::DayPeriod::Afternoon1)] = locale_data.unique_strings.ensure(move(symbol)); else if (key == "evening1"sv) - symbols[to_underlying(Unicode::DayPeriod::Evening)] = locale_data.unique_strings.ensure(move(symbol)); + symbols[to_underlying(Unicode::DayPeriod::Evening1)] = locale_data.unique_strings.ensure(move(symbol)); else if (key == "night1"sv) - symbols[to_underlying(Unicode::DayPeriod::Night)] = locale_data.unique_strings.ensure(move(symbol)); + symbols[to_underlying(Unicode::DayPeriod::Night1)] = locale_data.unique_strings.ensure(move(symbol)); }; narrow_symbols.for_each_member([&](auto const& key, JsonValue const& value) { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.cpp index 8abf7e1135..4144976733 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.cpp @@ -760,12 +760,12 @@ static Optional day_period_for_hour(StringView locale, StringView ca // FIXME: This isn't locale-aware. We should parse the CLDR's cldr-core/supplemental/dayPeriods.json file // to acquire day periods per-locale. For now, these are hard-coded to the en locale's values. if ((hour >= 6) && (hour < 12)) - return Unicode::get_calendar_day_period_symbol(locale, calendar, style, Unicode::DayPeriod::Morning); + return Unicode::get_calendar_day_period_symbol(locale, calendar, style, Unicode::DayPeriod::Morning1); if ((hour >= 12) && (hour < 18)) - return Unicode::get_calendar_day_period_symbol(locale, calendar, style, Unicode::DayPeriod::Afternoon); + return Unicode::get_calendar_day_period_symbol(locale, calendar, style, Unicode::DayPeriod::Afternoon1); if ((hour >= 18) && (hour < 21)) - return Unicode::get_calendar_day_period_symbol(locale, calendar, style, Unicode::DayPeriod::Evening); - return Unicode::get_calendar_day_period_symbol(locale, calendar, style, Unicode::DayPeriod::Night); + return Unicode::get_calendar_day_period_symbol(locale, calendar, style, Unicode::DayPeriod::Evening1); + return Unicode::get_calendar_day_period_symbol(locale, calendar, style, Unicode::DayPeriod::Night1); } // 11.1.7 FormatDateTimePattern ( dateTimeFormat, patternParts, x, rangeFormatOptions ), https://tc39.es/ecma402/#sec-formatdatetimepattern diff --git a/Userland/Libraries/LibUnicode/DateTimeFormat.h b/Userland/Libraries/LibUnicode/DateTimeFormat.h index f92bb96b81..b3fdeaa276 100644 --- a/Userland/Libraries/LibUnicode/DateTimeFormat.h +++ b/Userland/Libraries/LibUnicode/DateTimeFormat.h @@ -48,10 +48,10 @@ enum class Weekday : u8 { enum class DayPeriod : u8 { AM, PM, - Morning, - Afternoon, - Evening, - Night, + Morning1, + Afternoon1, + Evening1, + Night1, }; enum class HourCycle : u8 {