An open API service indexing awesome lists of open source software.

https://github.com/pumpkinseed/chrono-parser

Date, time parser in any format
https://github.com/pumpkinseed/chrono-parser

Last synced: 6 months ago
JSON representation

Date, time parser in any format

Awesome Lists containing this project

README

          

# chrono parser

Date, time parser in any format. Recognize the format and parse to `DateTime`.

Known formats:

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

### Usage

```rust
use chrono_parser::datetime;

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