use crate::{SecondsSinceUnixEpoch, Time}; /// Strictly parse the raw commit header format like `1745582210 +0200`. /// /// Some strict rules include: /// /// - The timezone offset must be present. /// - The timezone offset must have a sign; either `+` or `-`. /// - The timezone offset hours must be less than or equal to 14. /// - The timezone offset minutes must be exactly 0, 15, 30, or 45. /// - The timezone offset seconds may be present, but 0 is the only valid value. /// - Only whitespace may suffix the timezone offset. /// /// But this function isn't perfectly strict insofar as it allows arbitrary /// whitespace before and after the seconds and offset components. /// /// The goal is to only accept inputs that _unambiguously_ look like /// git's raw date format. pub fn parse_raw(input: &str) -> Option