Skip to main content

parse_date

Function parse_date 

Source
pub fn parse_date(input: Option<&str>) -> Result<Option<i64>>
Expand description

Parse a --since/--until style date into seconds since the Unix epoch. Accepts ISO 8601, RFC 2822, unix timestamps, and relative spellings like “2 weeks ago” (a documented subset of git’s approxidate).

§Errors

Returns an error if the input is not a recognized date format.