mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-29 14:32:55 +00:00
Userland: Move files destined for LibLocale to the Locale namespace
This commit is contained in:
parent
88504b89e1
commit
ff48220dca
Notes:
sideshowbarker
2024-07-17 07:30:06 +09:00
Author: https://github.com/trflynn89
Commit: ff48220dca
Pull-request: https://github.com/SerenityOS/serenity/pull/15096
Reviewed-by: https://github.com/linusg ✅
55 changed files with 720 additions and 716 deletions
|
@ -11,18 +11,18 @@
|
|||
#include <LibUnicode/NumberFormat.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace Unicode {
|
||||
namespace Locale {
|
||||
|
||||
HourCycle hour_cycle_from_string(StringView hour_cycle)
|
||||
{
|
||||
if (hour_cycle == "h11"sv)
|
||||
return Unicode::HourCycle::H11;
|
||||
return HourCycle::H11;
|
||||
else if (hour_cycle == "h12"sv)
|
||||
return Unicode::HourCycle::H12;
|
||||
return HourCycle::H12;
|
||||
else if (hour_cycle == "h23"sv)
|
||||
return Unicode::HourCycle::H23;
|
||||
return HourCycle::H23;
|
||||
else if (hour_cycle == "h24"sv)
|
||||
return Unicode::HourCycle::H24;
|
||||
return HourCycle::H24;
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
|
@ -125,12 +125,12 @@ static auto find_regional_values_for_locale(StringView locale, GetRegionalValues
|
|||
}
|
||||
|
||||
// https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
||||
Vector<Unicode::HourCycle> get_locale_hour_cycles(StringView locale)
|
||||
Vector<HourCycle> get_locale_hour_cycles(StringView locale)
|
||||
{
|
||||
return find_regional_values_for_locale(locale, get_regional_hour_cycles);
|
||||
}
|
||||
|
||||
Optional<Unicode::HourCycle> get_default_regional_hour_cycle(StringView locale)
|
||||
Optional<HourCycle> get_default_regional_hour_cycle(StringView locale)
|
||||
{
|
||||
if (auto hour_cycles = get_locale_hour_cycles(locale); !hour_cycles.is_empty())
|
||||
return hour_cycles.first();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue