aboutsummaryrefslogtreecommitdiff
path: root/src/calendar.rs
diff options
context:
space:
mode:
authorRuben Pollan2018-08-28 19:17:39 +0200
committerRuben Pollan2018-08-28 19:17:39 +0200
commit50e9a4421c7a27bcf01d7adab8d20b7df18f534c (patch)
tree568b2ace65bb41ec7d3bdebb5460705efa20af2a /src/calendar.rs
parent6263be67208f68a8c8ce1a8a18fc9921df53048e (diff)
Get events from the list by date
Diffstat (limited to 'src/calendar.rs')
-rw-r--r--src/calendar.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/calendar.rs b/src/calendar.rs
index c49e747..ab465ea 100644
--- a/src/calendar.rs
+++ b/src/calendar.rs
@@ -4,6 +4,7 @@ use ical::IcalParser;
use chrono::Duration;
use date::Date;
+use event;
use event::{Event, End};
use periodic::Periodic;
use errors::EventError;
@@ -62,8 +63,7 @@ impl Calendar {
}
pub fn get(&self, first: &Date, last: &Date) -> Vec<Event> {
- // TODO: not all single, just the one by date
- let mut events = self.single.clone();
+ let mut events = event::get(&self.single, first, last).to_vec();
for p in &self.periodic {
events.append(&mut p.get(first, last));
}