1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:37:35 +00:00

LibUnicode: Parse and generate per-locale day period ranges

This commit is contained in:
Timothy Flynn 2021-12-10 12:57:17 -05:00 committed by Linus Groh
parent fa8e881cfa
commit a417c23de0
3 changed files with 117 additions and 2 deletions

View file

@ -246,6 +246,15 @@ Optional<StringView> get_calendar_day_period_symbol([[maybe_unused]] StringView
#endif
}
Optional<StringView> get_calendar_day_period_symbol_for_hour([[maybe_unused]] StringView locale, [[maybe_unused]] StringView calendar, [[maybe_unused]] CalendarPatternStyle style, [[maybe_unused]] u8 hour)
{
#if ENABLE_UNICODE_DATA
return Detail::get_calendar_day_period_symbol_for_hour(locale, calendar, style, hour);
#else
return {};
#endif
}
Optional<StringView> get_time_zone_name([[maybe_unused]] StringView locale, [[maybe_unused]] StringView time_zone, [[maybe_unused]] CalendarPatternStyle style)
{
#if ENABLE_UNICODE_DATA

View file

@ -171,6 +171,7 @@ Optional<StringView> get_calendar_era_symbol(StringView locale, StringView calen
Optional<StringView> get_calendar_month_symbol(StringView locale, StringView calendar, CalendarPatternStyle style, Unicode::Month value);
Optional<StringView> get_calendar_weekday_symbol(StringView locale, StringView calendar, CalendarPatternStyle style, Unicode::Weekday value);
Optional<StringView> get_calendar_day_period_symbol(StringView locale, StringView calendar, CalendarPatternStyle style, Unicode::DayPeriod value);
Optional<StringView> get_calendar_day_period_symbol_for_hour(StringView locale, StringView calendar, CalendarPatternStyle style, u8 hour);
Optional<StringView> get_time_zone_name(StringView locale, StringView time_zone, CalendarPatternStyle style);
}