diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/main.rs b/src/main.rs index 67eb0fc..6d9544b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,30 +1,20 @@ -extern crate ical; -extern crate chrono; -extern crate chrono_tz; - -mod date; -mod event; -mod periodic; -mod calendar; -mod errors; +extern crate almanac; use std::env; use std::io::BufReader; use std::fs::File; -use chrono::Duration; -use date::Date; -use calendar::Calendar; +use almanac::Duration; +use almanac::Date; +use almanac::Calendar; fn main() { let args: Vec<_> = env::args().collect(); let file = File::open(&args[1]).unwrap(); let buf = BufReader::new(file); let calendar = Calendar::parse(buf).unwrap(); - println!("{}", calendar); - println!(""); let now = Date::now(); - let events = calendar.get(&now, &(now + Duration::weeks(10))); + let events = calendar.get(&now, &(now + Duration::days(1))); for e in events { println!("{}", e); } |