Function rfc822_sanitizer::parse_from_rfc2822_with_fallback [] [src]

pub fn parse_from_rfc2822_with_fallback(
    s: &str
) -> ParseResult<DateTime<FixedOffset>>

World is full of broken code and invalid rfc822/rfc2822 daytimes. This function acts like the normal DateTime::parse_from_rfc2822 would at first. It calls DateTime::parse_from_rfc2822(s), if it succedes It returns the normal result, But if It fails, It will try to sanitize the String s, and fix common ways date generators misshandle rfc822/rfc2822, And it will then try to parse it again as DayTime. BEWARE OF THE PERFORMANCE PENALTIES.