pydantic / speedate

Fast and simple datetime, date, time and duration parsing for rust.
https://docs.rs/speedate/latest/speedate/
MIT License
199 stars 17 forks source link

negative duration comparison error #12

Closed fcfangcc closed 2 years ago

fcfangcc commented 2 years ago

the test is failed. but in python is ok

let d7 = Duration::new(false, 3, 0, 0);
let d8 = Duration::new(false, 4, 0, 0);
assert!(d7 > d8);
assert!(d8 < d7);
In [3]: timedelta(days=-3) > timedelta(days=-4)
Out[3]: True
samuelcolvin commented 2 years ago

good catch, fixing now.