Fix start datetime of event

This commit is contained in:
Jan-Henrik 2024-01-09 23:34:11 +01:00
parent e555eb611e
commit 2bb5e84f7a

View file

@ -93,18 +93,15 @@ async fn convert(urls: &[&str], days: Option<&String>) -> Result<CustomCalendar>
vec!(start) vec!(start)
}; };
let mut found = false; let mut start = None;
for start_date in start_dates { for start_date in start_dates {
if start_date >= filter_start && start_date <= filter_end { if start_date >= filter_start && start_date <= filter_end {
found = true; start = Some(start_date);
break; break;
} }
} }
if !found { if let Some(start) = start {
continue;
}
let end = start + length; let end = start + length;
entries.push(CustomCalendarEntry { entries.push(CustomCalendarEntry {
@ -119,6 +116,7 @@ async fn convert(urls: &[&str], days: Option<&String>) -> Result<CustomCalendar>
}); });
} }
} }
}
calendar_index += 1; calendar_index += 1;
} }