Skip to main content

utc_cron_expr/calendar/
struct.rs

1/// Decomposed UTC date and time components for cron matching and iteration.
2#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3pub struct UtcDateTime {
4    /// Full Gregorian year (e.g. `2026`).
5    pub(crate) year: i32,
6    /// Month of year (`1..=12`).
7    pub(crate) month: u8,
8    /// Day of month (`1..=31`).
9    pub(crate) day: u8,
10    /// Day of week (`0 = Sunday ..= 6 = Saturday`).
11    pub(crate) weekday: u8,
12    /// Hour of day (`0..=23`).
13    pub(crate) hour: u8,
14    /// Minute of hour (`0..=59`).
15    pub(crate) minute: u8,
16    /// Second of minute (`0..=59`).
17    pub(crate) second: u8,
18}