pub trait CldrCalendar {
    type DateSymbolsV1Marker: KeyedDataMarker<Yokeable = DateSymbolsV1<'static>>;
    type DateLengthsV1Marker: KeyedDataMarker<Yokeable = DateLengthsV1<'static>>;

    const DEFAULT_BCP_47_IDENTIFIER: Value;

    // Provided method
    fn is_identifier_allowed_for_calendar(value: &Value) -> bool { ... }
}
Expand description

A calendar that can be found in CLDR

New implementors of this trait will likely also wish to modify get_era_code_map() in the CLDR transformer to support any new era maps.

Required Associated Types§

source

type DateSymbolsV1Marker: KeyedDataMarker<Yokeable = DateSymbolsV1<'static>>

The data marker for loading symbols for this calendar.

source

type DateLengthsV1Marker: KeyedDataMarker<Yokeable = DateLengthsV1<'static>>

The data marker for loading length-patterns for this calendar.

Required Associated Constants§

source

const DEFAULT_BCP_47_IDENTIFIER: Value

The Unicode BCP 47 identifier for the calendar If multiple BCP 47 identifiers work, this should be the default one when no others are provided

Provided Methods§

source

fn is_identifier_allowed_for_calendar(value: &Value) -> bool

Checks if a given BCP 47 identifier is allowed to be used with this calendar

By default, just checks against DEFAULT_BCP_47_IDENTIFIER

Implementors§

source§

impl CldrCalendar for Buddhist

source§

const DEFAULT_BCP_47_IDENTIFIER: Value = { const R: ::icu_locid::extensions::unicode::Value = ::icu_locid::extensions::unicode::Value::from_tinystr(match ::icu_locid::extensions::unicode::Value::subtag_from_bytes("buddhist".as_bytes()) { Ok(r) => r, _ => ::core::panicking::panic_fmt(<#[lang = "format_arguments"]>::new_const(&["Invalid Unicode extension value: buddhist"])), }); R }

§

type DateSymbolsV1Marker = BuddhistDateSymbolsV1Marker

§

type DateLengthsV1Marker = BuddhistDateLengthsV1Marker

source§

impl CldrCalendar for Coptic

source§

const DEFAULT_BCP_47_IDENTIFIER: Value = { const R: ::icu_locid::extensions::unicode::Value = ::icu_locid::extensions::unicode::Value::from_tinystr(match ::icu_locid::extensions::unicode::Value::subtag_from_bytes("coptic".as_bytes()) { Ok(r) => r, _ => ::core::panicking::panic_fmt(<#[lang = "format_arguments"]>::new_const(&["Invalid Unicode extension value: coptic"])), }); R }

§

type DateSymbolsV1Marker = CopticDateSymbolsV1Marker

§

type DateLengthsV1Marker = CopticDateLengthsV1Marker

source§

impl CldrCalendar for Ethiopian

source§

const DEFAULT_BCP_47_IDENTIFIER: Value = { const R: ::icu_locid::extensions::unicode::Value = ::icu_locid::extensions::unicode::Value::from_tinystr(match ::icu_locid::extensions::unicode::Value::subtag_from_bytes("ethiopic".as_bytes()) { Ok(r) => r, _ => ::core::panicking::panic_fmt(<#[lang = "format_arguments"]>::new_const(&["Invalid Unicode extension value: ethiopic"])), }); R }

§

type DateSymbolsV1Marker = EthiopianDateSymbolsV1Marker

§

type DateLengthsV1Marker = EthiopianDateLengthsV1Marker

source§

impl CldrCalendar for Indian

source§

const DEFAULT_BCP_47_IDENTIFIER: Value = { const R: ::icu_locid::extensions::unicode::Value = ::icu_locid::extensions::unicode::Value::from_tinystr(match ::icu_locid::extensions::unicode::Value::subtag_from_bytes("indian".as_bytes()) { Ok(r) => r, _ => ::core::panicking::panic_fmt(<#[lang = "format_arguments"]>::new_const(&["Invalid Unicode extension value: indian"])), }); R }

§

type DateSymbolsV1Marker = IndianDateSymbolsV1Marker

§

type DateLengthsV1Marker = IndianDateLengthsV1Marker

source§

impl CldrCalendar for Japanese

source§

const DEFAULT_BCP_47_IDENTIFIER: Value = { const R: ::icu_locid::extensions::unicode::Value = ::icu_locid::extensions::unicode::Value::from_tinystr(match ::icu_locid::extensions::unicode::Value::subtag_from_bytes("japanese".as_bytes()) { Ok(r) => r, _ => ::core::panicking::panic_fmt(<#[lang = "format_arguments"]>::new_const(&["Invalid Unicode extension value: japanese"])), }); R }

§

type DateSymbolsV1Marker = JapaneseDateSymbolsV1Marker

§

type DateLengthsV1Marker = JapaneseDateLengthsV1Marker

source§

impl CldrCalendar for JapaneseExtended

source§

const DEFAULT_BCP_47_IDENTIFIER: Value = { const R: ::icu_locid::extensions::unicode::Value = ::icu_locid::extensions::unicode::Value::from_tinystr(match ::icu_locid::extensions::unicode::Value::subtag_from_bytes("japanext".as_bytes()) { Ok(r) => r, _ => ::core::panicking::panic_fmt(<#[lang = "format_arguments"]>::new_const(&["Invalid Unicode extension value: japanext"])), }); R }

§

type DateSymbolsV1Marker = JapaneseExtendedDateSymbolsV1Marker

§

type DateLengthsV1Marker = JapaneseExtendedDateLengthsV1Marker

source§

impl CldrCalendar for Gregorian

source§

const DEFAULT_BCP_47_IDENTIFIER: Value = { const R: ::icu_locid::extensions::unicode::Value = ::icu_locid::extensions::unicode::Value::from_tinystr(match ::icu_locid::extensions::unicode::Value::subtag_from_bytes("gregory".as_bytes()) { Ok(r) => r, _ => ::core::panicking::panic_fmt(<#[lang = "format_arguments"]>::new_const(&["Invalid Unicode extension value: gregory"])), }); R }

§

type DateSymbolsV1Marker = GregorianDateSymbolsV1Marker

§

type DateLengthsV1Marker = GregorianDateLengthsV1Marker