Crates.io | dateless |
lib.rs | dateless |
version | 0.3.1 |
source | src |
created_at | 2021-04-26 17:04:14.497218 |
updated_at | 2021-05-09 16:29:56.149067 |
description | Events & calendar library for Rust |
homepage | |
repository | https://gitlab.com/v1olen/dateless |
max_upload_size | |
id | 389796 |
size | 46,752 |
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