dtparse 2.0.1

A dateutil-compatible timestamp parser for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
mod fuzzing;
mod pycompat_parser;
mod pycompat_tokenizer;

use chrono::NaiveDate;
use crate::parse;

#[test]
fn nanosecond_precision() {
    assert_eq!(
        parse("2008.12.29T08:09:10.123456789").unwrap(),
        (NaiveDate::from_ymd_opt(2008, 12, 29).unwrap().and_hms_nano_opt(8, 9, 10, 123_456_789).unwrap(), None)
    )
}