mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:57:44 +00:00
LibUnicode: Parse and generate locale display names for calendars
Note there's a bit of an unfortunate duplication in the calendar enum generated by UnicodeLocale and the existing enum generated by UnicodeDateTimeFormat. The former contains every calendar known to the CLDR, whereas the latter contains the calendars we've actually parsed for DateTimeFormat (currently only Gregorian). The new enum generated here can be removed once DateTimeFormat knows about all calendars.
This commit is contained in:
parent
1a3e6e8a7b
commit
7f162c471d
4 changed files with 59 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Tim Flynn <trflynn89@pm.me>
|
||||
* Copyright (c) 2021-2022, Tim Flynn <trflynn89@pm.me>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -146,6 +146,7 @@ Optional<Language> language_from_string(StringView language);
|
|||
Optional<Territory> territory_from_string(StringView territory);
|
||||
Optional<ScriptTag> script_tag_from_string(StringView script_tag);
|
||||
Optional<Currency> currency_from_string(StringView currency);
|
||||
Optional<CalendarName> calendar_name_from_string(StringView calendar);
|
||||
Optional<Key> key_from_string(StringView key);
|
||||
Optional<ListPatternType> list_pattern_type_from_string(StringView list_pattern_type);
|
||||
Optional<ListPatternStyle> list_pattern_style_from_string(StringView list_pattern_style);
|
||||
|
@ -158,6 +159,7 @@ Optional<StringView> get_locale_short_currency_mapping(StringView locale, String
|
|||
Optional<StringView> get_locale_narrow_currency_mapping(StringView locale, StringView currency);
|
||||
Optional<StringView> get_locale_numeric_currency_mapping(StringView locale, StringView currency);
|
||||
Optional<StringView> get_locale_currency_mapping(StringView locale, StringView currency, Style style);
|
||||
Optional<StringView> get_locale_calendar_mapping(StringView locale, StringView calendar);
|
||||
Optional<StringView> get_locale_key_mapping(StringView locale, StringView keyword);
|
||||
Vector<StringView> get_locale_key_mapping_list(StringView locale, StringView keyword);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue