chrono_parser

Crates.iochrono_parser
lib.rschrono_parser
version0.1.0
created_at2021-12-29 19:32:41.542055+00
updated_at2021-12-29 19:32:41.542055+00
descriptionParser extension on the top of chrono
homepage
repositoryhttps://github.com/PumpkinSeed/chrono-parser
max_upload_size
id504988
size18,983
Ferenc Fabian (PumpkinSeed)

documentation

README

chrono parser

Date, time parser in any format. Recognize the format and parse to DateTime<FixedOffset>.

Known formats:

  • RFC1123
  • RFC1123Z
  • RFC822
  • RFC822Z
  • RFC3339_NANO
  • ANSI_C
  • UNIX_FORMAT
  • RUBY_FORMAT
  • RFC850

Usage

use chrono_parser::datetime;

fn main() {
    match datetime("02 Jan 06 15:04 -0700".to_string()) {
        Ok(v) => {...}
        Err(err) => panic!("{}", err.to_string()),
    }
}
Commit count: 9

cargo fmt