summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibUnicode/Forward.h
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-07-06 08:21:32 -0400
committerLinus Groh <mail@linusgroh.de>2022-07-06 16:56:42 +0200
commit12e7c0808a1826e236bb8d0aab1e1c72edf37cb5 (patch)
tree38377f13664d44a4e5336812a021c9dd099eac5f /Userland/Libraries/LibUnicode/Forward.h
parent88a560dd843d6e9a050fa9322ca1d2c33f7a6628 (diff)
downloadserenity-12e7c0808a1826e236bb8d0aab1e1c72edf37cb5.zip
LibUnicode: Generate per-region week data
This includes: * The minimum number of days in a week for that week to count as the first week of a new year. * The day to be shown as the first day of the week in a calendar. * The start/end days of the weekend. Like the existing hour cycle data, week data is presented per-region in the CLDR, rather than per-locale. The method to add likely subtags to a locale to perform region lookups is the same. The list of regions in the CLDR for hour cycle, minimum days, first day, and weekend days are quite different. So rather than changing the existing HourCycleRegion enum to a generic Region enum, we generate separate enums for each of the week data fields. This allows each lookup into these fields to remain simple array-based index access, without any "jumps" for regions that don't have CLDR data for a field.
Diffstat (limited to 'Userland/Libraries/LibUnicode/Forward.h')
-rw-r--r--Userland/Libraries/LibUnicode/Forward.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibUnicode/Forward.h b/Userland/Libraries/LibUnicode/Forward.h
index 38bf202e68..4edea7b0f5 100644
--- a/Userland/Libraries/LibUnicode/Forward.h
+++ b/Userland/Libraries/LibUnicode/Forward.h
@@ -21,6 +21,7 @@ enum class Currency : u16;
enum class DateField : u8;
enum class DayPeriod : u8;
enum class Era : u8;
+enum class FirstDayRegion : u8;
enum class GeneralCategory : u8;
enum class GraphemeBreakProperty : u8;
enum class HourCycle : u8;
@@ -34,6 +35,7 @@ enum class Language : u16;
enum class ListPatternStyle : u8;
enum class ListPatternType : u8;
enum class Locale : u16;
+enum class MinimumDaysRegion : u8;
enum class Month : u8;
enum class NumericSymbol : u8;
enum class Property : u8;
@@ -44,6 +46,8 @@ enum class StandardNumberFormatType : u8;
enum class Style : u8;
enum class Territory : u8;
enum class Weekday : u8;
+enum class WeekendEndRegion : u8;
+enum class WeekendStartRegion : u8;
enum class WordBreakProperty : u8;
struct CalendarFormat;