Skip to main content

validate_config

Function validate_config 

Source
pub fn validate_config(
    schedule: &WeeklySchedule,
    timezone: &str,
    exceptions: &[HoursException],
) -> Result<(), HoursError>
Expand description

Check every time/date string in the config parses and every range is positive (open strictly before close). Called by validation so a malformed schedule is rejected at publish, not discovered mid-call. Overnight ranges (close ≤ open) are not a v1 feature — they fail here rather than silently never matching.