From 7f11bb5218e56d26f02e1272ed66e9dfdbfe4fff Mon Sep 17 00:00:00 2001 From: matin Date: Fri, 12 Sep 2025 00:02:09 +0200 Subject: korrektes update der anger. zeiten wenn zeitraeume wegfallen --- calendar_manager.py | 4 ++++ test.py | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/calendar_manager.py b/calendar_manager.py index 318eb83..9ef6596 100644 --- a/calendar_manager.py +++ b/calendar_manager.py @@ -132,6 +132,10 @@ class CalendarManager: return self.entries def correct_dates(self, list_of_events): + for entry in self.entries: + entry.corrected_start_date = None + entry.corrected_end_date = None + for start_date, end_date, original_id in list_of_events: entry = self.get_entry_by_id(original_id) entry.corrected_start_date = start_date diff --git a/test.py b/test.py index 7cf4fd0..8ea458c 100644 --- a/test.py +++ b/test.py @@ -36,5 +36,13 @@ def test_calculate_prediction(): print(f"Predicted completion date: {prediction}") print(calendar_manager.list_entries()) + prediction_controller.make_prediction("2023-02-01", 2) + + prediction = prediction_controller.get_prediction() + + # Output the result + print(f"Predicted completion date: {prediction}") + print(calendar_manager.list_entries()) + # Run the test test_calculate_prediction() \ No newline at end of file -- cgit v1.1