mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 14:35:07 +00:00

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.
70 lines
1.7 KiB
C++
70 lines
1.7 KiB
C++
/*
|
|
* Copyright (c) 2021-2022, Tim Flynn <trflynn89@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Types.h>
|
|
|
|
namespace Unicode {
|
|
|
|
enum class Block : u16;
|
|
enum class CalendarFormatType : u8;
|
|
enum class CalendarPatternStyle : u8;
|
|
enum class CalendarSymbol : u8;
|
|
enum class CharacterOrder : u8;
|
|
enum class CompactNumberFormatType : u8;
|
|
enum class Condition : u8;
|
|
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;
|
|
enum class HourCycleRegion : u16;
|
|
enum class Key : u8;
|
|
enum class KeywordCalendar : u8;
|
|
enum class KeywordColCaseFirst : u8;
|
|
enum class KeywordColNumeric : u8;
|
|
enum class KeywordNumbers : u8;
|
|
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;
|
|
enum class Script : u8;
|
|
enum class ScriptTag : u8;
|
|
enum class SentenceBreakProperty : u8;
|
|
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;
|
|
struct CalendarPattern;
|
|
struct CalendarRangePattern;
|
|
struct CurrencyCode;
|
|
struct Keyword;
|
|
struct LanguageID;
|
|
struct ListPatterns;
|
|
struct LocaleExtension;
|
|
struct LocaleID;
|
|
struct NumberFormat;
|
|
struct NumberGroupings;
|
|
struct OtherExtension;
|
|
struct SpecialCasing;
|
|
struct TransformedExtension;
|
|
struct TransformedField;
|
|
struct UnicodeData;
|
|
|
|
}
|