Skip to main content

rollover_if_new_day

Function rollover_if_new_day 

Source
pub fn rollover_if_new_day(state: &mut ScreenTimeState, today: &str) -> bool
Expand description

Mutate state to a fresh-day baseline if today differs from its stored date. Returns true iff a rollover happened (so the caller can decide whether to persist).