Function date_header::parse
source ยท pub fn parse(header: &[u8]) -> Result<u64, InvalidDate>
Expand description
Parse an HTTP date header into a u64 unix timestamp
This will parse IMF-fixdate, RFC850 dates, and asctime dates. See RFC9110 for more information.
let header = b"Fri, 15 May 2015 15:34:21 GMT";
assert_eq!(Ok(1431704061), date_header::parse(header));