Dateless is an events & calendar library for Rust.
use dateless::prelude::*;
use chrono::{Utc, Duration};
fn main() {
let mut calendar = Calendar::new();
let event = EventPartial::new(String::from("Anne's birthday"))
.whole_day(Utc::today())
.weekly()
.complete();
calendar.add_event(event);
let seven_days_later = Utc::today() + Duration::days(7);
println!("{:#?}", calendar.day(seven_days_later));
}
It prints to stdout
:
[
EventOccurrence {
name: "Anne's birthday",
description: None,
period: WholeDays(
2021-05-08Z,
2021-05-08Z,
),
},
]
Soon