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
- Host: GitHub
- URL: https://github.com/pumpkinseed/chrono-parser
- Owner: PumpkinSeed
- License: apache-2.0
- Created: 2021-12-28T16:00:22.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-29T19:32:58.000Z (almost 4 years ago)
- Last Synced: 2025-02-15T12:09:06.324Z (8 months ago)
- Language: Rust
- Size: 15.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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()),
}
}
```