Skip to main content

teksilo_widgets/common/
datetime.rs

1// SPDX-License-Identifier: MPL-2.0
2// SPDX-FileCopyrightText: 2026 FernTech
3
4//! Date/time infrastructure shared by `Calendar`, `DateEdit`, `TimeEdit`,
5//! and `DateTimeEdit`.
6//!
7//! This module is the single point of contact with the underlying date/time
8//! crate (`jiff` today). The widgets above never name `jiff` — they go
9//! through the type aliases re-exported here. If a future swap is ever
10//! needed, the widget code does not change.
11
12pub mod locale;
13pub mod month_names;
14pub mod pattern;
15pub mod types;
16pub mod weekday_names;
17pub(crate) mod written;
18
19pub use self::locale::{
20    first_day_of_week_for_locale, format_pattern_for_locale, prefers_12_hour_clock,
21};
22pub use self::month_names::{month_long_key, month_short_key};
23pub use self::pattern::{
24    ParsedPattern, PatternError, PatternToken, SegmentKind, format_value, parse_value,
25    segment_at_position, segments_layout, step_date_field, step_time_field,
26};
27pub use self::types::{Date, DateTime, Time, Weekday, YearMonth};
28pub use self::weekday_names::{weekday_long_key, weekday_narrow_key, weekday_short_key};