diff options
author | Fredrik Meringdal <fmeringdal@hotmail.com> | 2020-10-31 18:15:21 +0100 |
---|---|---|
committer | Fredrik Meringdal <fmeringdal@hotmail.com> | 2020-10-31 18:15:21 +0100 |
commit | a600a4e88053a89670aa4bdec0800089018f5c1c (patch) | |
tree | 8911ff0dbb9ba184573630aca58a241157a4234a /src/datetime.rs | |
parent | 93a7edadb0b920752d17c170aa02eda1d4953134 (diff) | |
download | rust_rrule-a600a4e88053a89670aa4bdec0800089018f5c1c.zip |
removed more unwraps
Diffstat (limited to 'src/datetime.rs')
-rw-r--r-- | src/datetime.rs | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/datetime.rs b/src/datetime.rs index 46b1643..4702e0e 100644 --- a/src/datetime.rs +++ b/src/datetime.rs @@ -1,7 +1,6 @@ use chrono::prelude::*; use chrono_tz::Tz; - pub type DTime = DateTime<Tz>; // pub fn from_ordinal(ordinal: isize) -> DateTime<Utc> { @@ -15,7 +14,6 @@ pub fn from_ordinal(ordinal: isize, tz: &Tz) -> DTime { tz.timestamp(timestamp as i64, 0) } - pub fn to_ordinal(date: &DateTime<Utc>) -> isize { (date.timestamp() / 60 / 60 / 24) as isize } |