summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatin <matin.kaufmann@gmail.com>2025-09-12 00:02:09 +0200
committermatin <matin.kaufmann@gmail.com>2025-09-12 00:02:09 +0200
commit7f11bb5218e56d26f02e1272ed66e9dfdbfe4fff (patch)
treea0e358c08c9ebf69e362e32bf1d0d60c52c05615
parent98b2fa72b9f56ab415ec46d15cecd1898b9b2db1 (diff)
korrektes update der anger. zeiten wenn zeitraeume wegfallen
-rw-r--r--calendar_manager.py4
-rw-r--r--test.py8
2 files changed, 12 insertions, 0 deletions
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