Crate rfc822_sanitizer [] [src]

Functions

parse_from_rfc2822_with_fallback

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.

sanitize_rfc822_like_date