Trait icu_datetime::provider::date_time::DateSymbols

source ·
pub(crate) trait DateSymbols<'data> {
    // Required methods
    fn get_symbol_for_month(
        &self,
        month: Month,
        length: FieldLength,
        code: MonthCode,
    ) -> Result<MonthPlaceholderValue<'_>, GetSymbolForMonthError>;
    fn get_symbol_for_weekday(
        &self,
        weekday: Weekday,
        length: FieldLength,
        day: IsoWeekday,
    ) -> Result<&str, GetSymbolForWeekdayError>;
    fn get_symbol_for_era<'a>(
        &'a self,
        length: FieldLength,
        era_code: &'a Era,
    ) -> Result<&str, GetSymbolForEraError>;
}

Required Methods§

source

fn get_symbol_for_month( &self, month: Month, length: FieldLength, code: MonthCode, ) -> Result<MonthPlaceholderValue<'_>, GetSymbolForMonthError>

source

fn get_symbol_for_weekday( &self, weekday: Weekday, length: FieldLength, day: IsoWeekday, ) -> Result<&str, GetSymbolForWeekdayError>

source

fn get_symbol_for_era<'a>( &'a self, length: FieldLength, era_code: &'a Era, ) -> Result<&str, GetSymbolForEraError>

Gets the era symbol, or None if data is loaded but symbol isn’t found.

None should fall back to the era code directly, if, for example, a japanext datetime is formatted with a DateTimeFormat<Japanese>

Implementors§

source§

impl<'data> DateSymbols<'data> for DateSymbolsV1<'data>