1 个不稳定版本
0.1.0 | 2021 年 12 月 29 日 |
---|
#435 在 日期和时间
8KB
123 行
chrono parser
任何格式的日期、时间解析器。识别格式并将解析为 DateTime<FixedOffset>
。
已知格式
- RFC1123
- RFC1123Z
- RFC822
- RFC822Z
- RFC3339_NANO
- ANSI_C
- UNIX_FORMAT
- RUBY_FORMAT
- RFC850
用法
use chrono_parser::datetime;
fn main() {
match datetime("02 Jan 06 15:04 -0700".to_string()) {
Ok(v) => {...}
Err(err) => panic!("{}", err.to_string()),
}
}
依赖项
~3–4.5MB
~71K SLoC