aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/event.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/event.rs b/src/event.rs
index b43f28d..066b691 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -40,8 +40,8 @@ impl Event {
location: "".to_string(),
description: "".to_string(),
status: Status::Confirmed,
- start: Date::Time(UTC.timestamp(0, 0)),
- end: Date::Time(UTC.timestamp(0, 0)),
+ start: Date::empty(),
+ end: Date::empty(),
};
}
}
@@ -60,6 +60,10 @@ impl fmt::Display for Event {
}
impl Date {
+ pub fn empty() -> Date {
+ Date::Time(UTC.timestamp(0, 0))
+ }
+
pub fn cmp(&self, other: &Self) -> Ordering {
match *self {
Date::Time(t1) => {