This commit is contained in:
Mylloon 2022-08-15 19:41:52 +02:00
parent ab78a9d221
commit d31a051217
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -1,13 +1,19 @@
use ics::ICalendar; use ics::{Event, ICalendar};
pub fn export( type T = Vec<crate::timetable::models::Day>;
timetable: Vec<crate::timetable::models::Day>, type D = std::collections::HashMap<
dates: std::collections::HashMap<
usize, usize,
Vec<(chrono::DateTime<chrono::Utc>, chrono::DateTime<chrono::Utc>)>, Vec<(chrono::DateTime<chrono::Utc>, chrono::DateTime<chrono::Utc>)>,
>, >;
) -> ICalendar<'static> {
pub fn export(_timetable: T, _dates: D) -> ICalendar<'static> {
let mut calendar = ICalendar::new("2.0", "cal8tor"); let mut calendar = ICalendar::new("2.0", "cal8tor");
let event = Event::new("uid", "dtstamp");
calendar.add_event(event);
calendar.save_file("target/debug2.ics").unwrap();
calendar calendar
} }