Skip to content

Commit

Permalink
remove holiday dosing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sxyntheon authored Aug 18, 2024
1 parent 2087f7a commit 5d59d59
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions backend/src/api_wrapper/untis_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,6 @@ impl UntisClient {
id.clone_into(&mut parameter.options.element.id);
parameter.options.element.r#type = 1;
}

let start_date = chrono::NaiveDate::parse_from_str(&parameter.options.start_date, "%Y%m%d").map_err(|err| Error::UntisError(err.to_string()))?;
let end_date = chrono::NaiveDate::parse_from_str(&parameter.options.end_date, "%Y%m%d").map_err(|err| Error::UntisError(err.to_string()))?;
let max_date = chrono::NaiveDate::from_ymd_opt(2024, 7, 5).unwrap();
if (start_date > max_date) || (end_date > max_date) {
debug!("is out of bounds");
return Err(Error::UntisError("Date out of bounds".to_string()));
}
debug!("startdate: {}, enddate: {}, maxdate: {}", start_date, end_date, max_date);
let response = self
.request(utils::Parameter::TimetableParameter(parameter.clone()), "getTimetable".to_string())
.await
Expand Down

0 comments on commit 5d59d59

Please sign in to comment.