Skip to main content

parse_since_cutoff

Function parse_since_cutoff 

Source
pub fn parse_since_cutoff(input: &str) -> Result<DateTime<Utc>>
Expand description

Parse a --since-style value. Accepts either a relative duration (7d, 24h, 30m, 1w, 90s) or an ISO-8601 absolute timestamp (2026-04-01, 2026-04-01T12:00:00Z). Returns the resulting cutoff instant (now - duration, or the ISO value itself).