Module time_picker

Source
Expand description

Pure time picker values and formatting helpers.

§Examples

use ailloli_ui_core::time_picker::{TimeFormat, TimeValue};
assert_eq!(TimeValue::new(13, 5).format(TimeFormat::Hour12), "1:05 PM");

Pure time picker values and formatting helpers.

Structs§

TimeValue
A wall-clock time with minute precision.

Enums§

TimeFormat
Text representation used to parse or format TimeValue.

Functions§

nudge_time
Moves a time by delta_minutes, clamps it to the current day, then snaps it.
parse_time
Parses a time in the exact representation selected by format.
sanitize_step_minutes
Clamps a minute step to the supported inclusive range 1..=60.
snap_time
Rounds a time to the nearest sanitized minute step.