pub struct LanguageData {Show 19 fields
pub code: &'static str,
pub name: &'static str,
pub months_long: &'static [&'static str; 12],
pub months_short: &'static [&'static str; 12],
pub weekdays_long: &'static [&'static str; 7],
pub weekdays_short: &'static [&'static str; 7],
pub am_indicators: &'static [&'static str],
pub pm_indicators: &'static [&'static str],
pub ago_words: &'static [&'static str],
pub future_words: &'static [&'static str],
pub future_prefix: &'static [&'static str],
pub past_prefix: &'static [&'static str],
pub special_words: &'static [(SpecialWord, &'static [&'static str])],
pub last_words: &'static [&'static str],
pub next_words: &'static [&'static str],
pub this_words: &'static [&'static str],
pub time_units: &'static [(TimeUnit, &'static [&'static str])],
pub number_words: &'static [(&'static str, i64)],
pub date_order: DateOrder,
}Expand description
Language-specific data for parsing and formatting dates.
All string data is &'static and compiled directly into the binary.
Fields§
§code: &'static strISO 639-1 language code (e.g. “en”, “zh”)
name: &'static strHuman-readable language name
months_long: &'static [&'static str; 12]§months_short: &'static [&'static str; 12]§weekdays_long: &'static [&'static str; 7]§weekdays_short: &'static [&'static str; 7]§am_indicators: &'static [&'static str]§pm_indicators: &'static [&'static str]§ago_words: &'static [&'static str]Words that appear after <n> <unit> to indicate the past (e.g. “ago”)
future_words: &'static [&'static str]Words that appear after <n> <unit> to indicate the future (e.g. “from now”, “later”)
future_prefix: &'static [&'static str]Prefixes that appear before <n> <unit> to indicate the future (e.g. “in”)
past_prefix: &'static [&'static str]Prefixes that appear before <n> <unit> to indicate the past
(e.g. “hace” in Spanish, “il y a” in French, “vor” in German)
special_words: &'static [(SpecialWord, &'static [&'static str])]§last_words: &'static [&'static str]§next_words: &'static [&'static str]§this_words: &'static [&'static str]§time_units: &'static [(TimeUnit, &'static [&'static str])]§number_words: &'static [(&'static str, i64)]§date_order: DateOrderTrait Implementations§
Auto Trait Implementations§
impl Freeze for LanguageData
impl RefUnwindSafe for LanguageData
impl Send for LanguageData
impl Sync for LanguageData
impl Unpin for LanguageData
impl UnsafeUnpin for LanguageData
impl UnwindSafe for LanguageData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more