From 5e29e04122bdabc87e1cde52cfbd3cf082e6b793 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Fri, 27 Jan 2023 11:12:01 -0500 Subject: LibJS+LibLocale: Propagate errors from find_regional_values_for_locale This had quite the footprint. --- Userland/Libraries/LibLocale/DateTimeFormat.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'Userland/Libraries/LibLocale/DateTimeFormat.h') diff --git a/Userland/Libraries/LibLocale/DateTimeFormat.h b/Userland/Libraries/LibLocale/DateTimeFormat.h index 12c3b8cb61..63198c01fb 100644 --- a/Userland/Libraries/LibLocale/DateTimeFormat.h +++ b/Userland/Libraries/LibLocale/DateTimeFormat.h @@ -190,24 +190,24 @@ StringView calendar_pattern_style_to_string(CalendarPatternStyle style); Optional hour_cycle_region_from_string(StringView hour_cycle_region); Vector get_regional_hour_cycles(StringView region); -Vector get_locale_hour_cycles(StringView locale); -Optional get_default_regional_hour_cycle(StringView locale); +ErrorOr> get_locale_hour_cycles(StringView locale); +ErrorOr> get_default_regional_hour_cycle(StringView locale); Optional minimum_days_region_from_string(StringView minimum_days_region); Optional get_regional_minimum_days(StringView region); -Optional get_locale_minimum_days(StringView region); +ErrorOr> get_locale_minimum_days(StringView locale); Optional first_day_region_from_string(StringView first_day_region); Optional get_regional_first_day(StringView region); -Optional get_locale_first_day(StringView region); +ErrorOr> get_locale_first_day(StringView locale); Optional weekend_start_region_from_string(StringView weekend_start_region); Optional get_regional_weekend_start(StringView region); -Optional get_locale_weekend_start(StringView region); +ErrorOr> get_locale_weekend_start(StringView locale); Optional weekend_end_region_from_string(StringView weekend_end_region); Optional get_regional_weekend_end(StringView region); -Optional get_locale_weekend_end(StringView region); +ErrorOr> get_locale_weekend_end(StringView locale); ErrorOr combine_skeletons(StringView first, StringView second); @@ -220,11 +220,11 @@ ErrorOr> get_calendar_default_range_format(String ErrorOr> get_calendar_range_formats(StringView locale, StringView calendar, StringView skeleton); ErrorOr> get_calendar_range12_formats(StringView locale, StringView calendar, StringView skeleton); -Optional get_calendar_era_symbol(StringView locale, StringView calendar, CalendarPatternStyle style, Era value); -Optional get_calendar_month_symbol(StringView locale, StringView calendar, CalendarPatternStyle style, Month value); -Optional get_calendar_weekday_symbol(StringView locale, StringView calendar, CalendarPatternStyle style, Weekday value); -Optional get_calendar_day_period_symbol(StringView locale, StringView calendar, CalendarPatternStyle style, DayPeriod value); -Optional get_calendar_day_period_symbol_for_hour(StringView locale, StringView calendar, CalendarPatternStyle style, u8 hour); +ErrorOr> get_calendar_era_symbol(StringView locale, StringView calendar, CalendarPatternStyle style, Era value); +ErrorOr> get_calendar_month_symbol(StringView locale, StringView calendar, CalendarPatternStyle style, Month value); +ErrorOr> get_calendar_weekday_symbol(StringView locale, StringView calendar, CalendarPatternStyle style, Weekday value); +ErrorOr> get_calendar_day_period_symbol(StringView locale, StringView calendar, CalendarPatternStyle style, DayPeriod value); +ErrorOr> get_calendar_day_period_symbol_for_hour(StringView locale, StringView calendar, CalendarPatternStyle style, u8 hour); ErrorOr format_time_zone(StringView locale, StringView time_zone, CalendarPatternStyle style, AK::Time time); Optional get_time_zone_name(StringView locale, StringView time_zone, CalendarPatternStyle style, TimeZone::InDST in_dst); -- cgit v1.2.3