1use aion::*;
2use chrono::{TimeZone, Utc};
3
4fn main() {
5 let two_days = 2.days();
7 println!("2 days: {:?}", two_days);
8 let attention_span = 1.seconds();
9 println!("Attention span: {:?}", attention_span);
10
11 let two_hours_from_now = 2.hours().from_now();
13 println!("2 hours from now: {}", two_hours_from_now);
14 let last_week = 7.days().ago(); println!("1 week ago: {}", last_week);
16
17 let christmas = Utc.ymd(2020, 12, 25).and_hms(0, 0, 0);
19 let two_weeks_before_christmas = 2.weeks().before(christmas);
20 println!("2 weeks before christmas: {}", two_weeks_before_christmas);
21 let boxing_day = 1.days().after(christmas);
22 println!("Boxing day: {}", boxing_day);
23}