hutools 0.0.1

All tools sets
Documentation
1
2
3
4
5
6
7
8
9
use chrono::Duration;

pub fn get_duration<T>(date_range: (T, T)) -> Duration
where
    T: std::ops::Sub<Output = Duration>,
{
    let (start, end) = date_range;
    end - start
}