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;
17
18pub use self::locale::{
19    first_day_of_week_for_locale, format_pattern_for_locale, prefers_12_hour_clock,
20};
21pub use self::month_names::{month_long_key, month_short_key};
22pub use self::pattern::{
23    ParsedPattern, PatternError, PatternToken, SegmentKind, format_value, parse_value,
24    segment_at_position, segments_layout, step_date_field, step_time_field,
25};
26pub use self::types::{Date, DateTime, Time, Weekday, YearMonth};
27pub use self::weekday_names::{weekday_long_key, weekday_narrow_key, weekday_short_key};