Skip to main content

Module datetime

Module datetime 

Source
Expand description

Date/time infrastructure shared by Calendar, DateEdit, TimeEdit, and DateTimeEdit.

This module is the single point of contact with the underlying date/time crate (jiff today). The widgets above never name jiff — they go through the type aliases re-exported here. If a future swap is ever needed, the widget code does not change.

Re-exports§

pub use self::locale::first_day_of_week_for_locale;
pub use self::locale::format_pattern_for_locale;
pub use self::locale::prefers_12_hour_clock;
pub use self::month_names::month_long_key;
pub use self::month_names::month_short_key;
pub use self::pattern::ParsedPattern;
pub use self::pattern::PatternError;
pub use self::pattern::PatternToken;
pub use self::pattern::SegmentKind;
pub use self::pattern::format_value;
pub use self::pattern::parse_value;
pub use self::pattern::segment_at_position;
pub use self::pattern::segments_layout;
pub use self::pattern::step_date_field;
pub use self::pattern::step_time_field;
pub use self::types::YearMonth;
pub use self::weekday_names::weekday_long_key;
pub use self::weekday_names::weekday_narrow_key;
pub use self::weekday_names::weekday_short_key;

Modules§

locale
Per-locale defaults: first day of week + segment-pattern.
month_names
Localized month names — tr_widget! keys grouped by width.
pattern
Strftime-subset pattern parser shared by DateEdit and TimeEdit.
types
Stable type aliases for the date/time types used across the four datetime widgets. Routes through jiff today; swap-friendly because the widgets never name jiff directly.
weekday_names
Localized weekday names — tr_widget! keys grouped by width.

Structs§

Date
A representation of a civil date in the Gregorian calendar.
DateTime
A representation of a civil datetime in the Gregorian calendar.
Time
A representation of civil “wall clock” time.

Enums§

Weekday
A representation for the day of the week.