File: simple.rs

package info (click to toggle)
rust-rfc822-sanitizer 0.3.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 264 kB
  • sloc: makefile: 4
file content (16 lines) | stat: -rw-r--r-- 424 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
extern crate rfc822_sanitizer;
use rfc822_sanitizer::parse_from_rfc2822_with_fallback;

fn main() {
    let dates = vec![
        "Thu, 05 Aug 2016 06:00:00 -0400",
        "Mon, 31 July 2017 16:00:00 PDT",
        "Wed, 20 Sep 2017 10:00:00 -0000",
        "30 Aug 2017 1:30:00 PDT",
    ];

    for date in dates {
        let fallback = parse_from_rfc2822_with_fallback(date);
        println!("{:?}", fallback);
    }
}