Converts a DateTime to the number of days since Unix epoch (1970-01-01)
(dt: &T)
| 142 | |
| 143 | /// Converts a DateTime to the number of days since Unix epoch (1970-01-01) |
| 144 | fn datetime_to_days<T: Datelike>(dt: &T) -> i32 { |
| 145 | dt.num_days_from_ce() |
| 146 | - NaiveDate::from_ymd_opt(1970, 1, 1) |
| 147 | .unwrap() |
| 148 | .num_days_from_ce() |
| 149 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…