FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    DateTimeFormatInfo

    struct · ferroui-base · v0.5.0

    struct DateTimeFormatInfo
    

    The date and time conventions of a culture.

    The instances handed out by CultureInfo::date_time_format are shared and read-only; to change conventions clone the value, use the setters and attach it to a culture with CultureInfo::with_date_time_format.

    View source

    Members

    new

    fn new() -> DateTimeFormatInfo
    

    Conventions with the values of the invariant culture (C# new DateTimeFormatInfo()); change them with the setters.

    Source

    invariant_info

    fn invariant_info() -> Rc<DateTimeFormatInfo>
    

    The conventions of the invariant culture.

    Source

    current_info

    fn current_info() -> Rc<DateTimeFormatInfo>
    

    The conventions of the current culture.

    Source

    calendar

    fn calendar(self: &Self) -> GregorianCalendar
    

    The calendar of the conventions; always the Gregorian one.

    Source

    short_date_pattern

    fn short_date_pattern(self: &Self) -> &str
    

    The pattern of a short date (format "d").

    Source

    set_short_date_pattern

    fn set_short_date_pattern(self: &mut Self, value: impl Into<String>)
    

    Sets the pattern of a short date.

    Source

    long_date_pattern

    fn long_date_pattern(self: &Self) -> &str
    

    The pattern of a long date (format "D").

    Source

    set_long_date_pattern

    fn set_long_date_pattern(self: &mut Self, value: impl Into<String>)
    

    Sets the pattern of a long date.

    Source

    short_time_pattern

    fn short_time_pattern(self: &Self) -> &str
    

    The pattern of a short time (format "t").

    Source

    set_short_time_pattern

    fn set_short_time_pattern(self: &mut Self, value: impl Into<String>)
    

    Sets the pattern of a short time.

    Source

    long_time_pattern

    fn long_time_pattern(self: &Self) -> &str
    

    The pattern of a long time (format "T").

    Source

    set_long_time_pattern

    fn set_long_time_pattern(self: &mut Self, value: impl Into<String>)
    

    Sets the pattern of a long time.

    Source

    full_date_time_pattern

    fn full_date_time_pattern(self: &Self) -> Cow<'_, str>
    

    The pattern of a long date and long time (format "F"): the long date pattern, a space and the long time pattern unless set explicitly.

    Source

    set_full_date_time_pattern

    fn set_full_date_time_pattern(self: &mut Self, value: impl Into<String>)
    

    Sets the pattern of a long date and long time.

    Source

    month_day_pattern

    fn month_day_pattern(self: &Self) -> &str
    

    The pattern of a month and day (format "M").

    Source

    set_month_day_pattern

    fn set_month_day_pattern(self: &mut Self, value: impl Into<String>)
    

    Sets the pattern of a month and day.

    Source

    year_month_pattern

    fn year_month_pattern(self: &Self) -> &str
    

    The pattern of a year and month (format "Y").

    Source

    set_year_month_pattern

    fn set_year_month_pattern(self: &mut Self, value: impl Into<String>)
    

    Sets the pattern of a year and month.

    Source

    rfc1123_pattern

    fn rfc1123_pattern(self: &Self) -> &'static str
    

    The pattern of the round-trip format "R" (RFC 1123).

    Source

    sortable_date_time_pattern

    fn sortable_date_time_pattern(self: &Self) -> &'static str
    

    The pattern of the sortable format "s".

    Source

    universal_sortable_date_time_pattern

    fn universal_sortable_date_time_pattern(self: &Self) -> &'static str
    

    The pattern of the universal sortable format "u".

    Source

    am_designator

    fn am_designator(self: &Self) -> &str
    

    The designator of hours before noon.

    Source

    set_am_designator

    fn set_am_designator(self: &mut Self, value: impl Into<String>)
    

    Sets the designator of hours before noon.

    Source

    pm_designator

    fn pm_designator(self: &Self) -> &str
    

    The designator of hours after noon.

    Source

    set_pm_designator

    fn set_pm_designator(self: &mut Self, value: impl Into<String>)
    

    Sets the designator of hours after noon.

    Source

    date_separator

    fn date_separator(self: &Self) -> &str
    

    The text the / specifier of a custom format produces.

    Source

    set_date_separator

    fn set_date_separator(self: &mut Self, value: impl Into<String>)
    

    Sets the date separator.

    Source

    time_separator

    fn time_separator(self: &Self) -> &str
    

    The text the : specifier of a custom format produces.

    Source

    set_time_separator

    fn set_time_separator(self: &mut Self, value: impl Into<String>)
    

    Sets the time separator.

    Source

    first_day_of_week

    fn first_day_of_week(self: &Self) -> DayOfWeek
    

    The first day of the week.

    Source

    set_first_day_of_week

    fn set_first_day_of_week(self: &mut Self, value: DayOfWeek)
    

    Sets the first day of the week.

    Source

    calendar_week_rule

    fn calendar_week_rule(self: &Self) -> CalendarWeekRule
    

    The rule that determines the first week of a year.

    Source

    set_calendar_week_rule

    fn set_calendar_week_rule(self: &mut Self, value: CalendarWeekRule)
    

    Sets the rule that determines the first week of a year.

    Source

    day_names

    fn day_names(self: &Self) -> &[String; 7]
    

    The full names of the days, indexed by DayOfWeek (Sunday first).

    Source

    set_day_names

    fn set_day_names(self: &mut Self, value: [String; 7])
    

    Sets the full names of the days.

    Source

    abbreviated_day_names

    fn abbreviated_day_names(self: &Self) -> &[String; 7]
    

    The abbreviated names of the days, indexed by DayOfWeek.

    Source

    set_abbreviated_day_names

    fn set_abbreviated_day_names(self: &mut Self, value: [String; 7])
    

    Sets the abbreviated names of the days.

    Source

    shortest_day_names

    fn shortest_day_names(self: &Self) -> &[String; 7]
    

    The shortest unique names of the days, indexed by DayOfWeek.

    Source

    set_shortest_day_names

    fn set_shortest_day_names(self: &mut Self, value: [String; 7])
    

    Sets the shortest names of the days.

    Source

    month_names

    fn month_names(self: &Self) -> &[String; 13]
    

    The full names of the months; the thirteenth entry is empty, as in .NET.

    Source

    set_month_names

    fn set_month_names(self: &mut Self, value: [String; 13])
    

    Sets the full names of the months.

    Source

    abbreviated_month_names

    fn abbreviated_month_names(self: &Self) -> &[String; 13]
    

    The abbreviated names of the months; the thirteenth entry is empty.

    Source

    set_abbreviated_month_names

    fn set_abbreviated_month_names(self: &mut Self, value: [String; 13])
    

    Sets the abbreviated names of the months.

    Source

    get_day_name

    fn get_day_name(self: &Self, day_of_week: DayOfWeek) -> &str
    

    The full name of a day.

    Source

    get_abbreviated_day_name

    fn get_abbreviated_day_name(self: &Self, day_of_week: DayOfWeek) -> &str
    

    The abbreviated name of a day.

    Source

    get_shortest_day_name

    fn get_shortest_day_name(self: &Self, day_of_week: DayOfWeek) -> &str
    

    The shortest name of a day.

    Source

    get_month_name

    fn get_month_name(self: &Self, month: i32) -> &str
    

    The full name of a month, 1..=13. Panics for other values.

    Source

    month_genitive_names

    fn month_genitive_names(self: &Self) -> &[String; 13]
    

    The full names of the months in the form a date with a day number takes (.NET MonthGenitiveNames): "7 stycznia" beside "styczeń 2026". The plain names for a culture that has no such form.

    Source

    set_month_genitive_names

    fn set_month_genitive_names(self: &mut Self, value: [String; 13])
    

    Sets the full names of the months in the form a date with a day number takes.

    Source

    abbreviated_month_genitive_names

    fn abbreviated_month_genitive_names(self: &Self) -> &[String; 13]
    

    The abbreviated names of the months in the form a date with a day number takes (.NET AbbreviatedMonthGenitiveNames). The plain abbreviated names for a culture that has no such form.

    Source

    set_abbreviated_month_genitive_names

    fn set_abbreviated_month_genitive_names(self: &mut Self, value: [String; 13])
    

    Sets the abbreviated names of the months in the form a date with a day number takes.

    Source

    get_abbreviated_month_name

    fn get_abbreviated_month_name(self: &Self, month: i32) -> &str
    

    The abbreviated name of a month, 1..=13. Panics for other values.

    Source

    get_era_name

    fn get_era_name(self: &Self, _era: i32) -> &str
    

    The name of the only era of the Gregorian calendar (the g specifier).

    Source

    set_era_name

    fn set_era_name(self: &mut Self, value: impl Into<String>)
    

    Sets the name of the era.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • Debug
    • StructuralPartialEq
    • PartialEq
    • Eq
    • Default
    • DateTimeFormatProvider

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.