aboutsummaryrefslogtreecommitdiff
path: root/src/date.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/date.rs')
-rw-r--r--src/date.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/date.rs b/src/date.rs
index 8d41c67..45a0c28 100644
--- a/src/date.rs
+++ b/src/date.rs
@@ -9,7 +9,7 @@ use chrono::offset::Utc;
use chrono_tz::{Tz, UTC};
-#[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Eq)]
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum Date {
Time(chrono::DateTime<Tz>),
AllDay(chrono::Date<Tz>),
@@ -109,6 +109,12 @@ impl Ord for Date {
}
}
+impl PartialOrd for Date {
+ fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+ Some(self.cmp(other))
+ }
+}
+
impl Add<Duration> for Date {
type Output = Date;