Skip to main content

http_date

Function http_date 

Source
pub fn http_date(value: &[u8]) -> Result<HttpDate, ParseError>
Available on crate feature std only.
Expand description

Parses an HTTP-date in any format, resolving RFC 850 years against the system clock.

§Errors

As HttpDate::parse_at.

§Examples

let d = parse_net::http_date(b"Sun, 06 Nov 1994 08:49:37 GMT")?;
assert_eq!(d.unix(), 784_111_777);