summaryrefslogtreecommitdiff
path: root/date_calculator.py
diff options
context:
space:
mode:
authormatin <matin.kaufmann@gmail.com>2025-09-11 23:45:16 +0200
committermatin <matin.kaufmann@gmail.com>2025-09-11 23:45:16 +0200
commit98b2fa72b9f56ab415ec46d15cecd1898b9b2db1 (patch)
tree75b978325356b39d8ac5783efe62558dfc37fbc0 /date_calculator.py
parent0f55c85af88578e6cc01d1e9a44d39ee6453722a (diff)
fixed bug: negative periods
Diffstat (limited to 'date_calculator.py')
-rw-r--r--date_calculator.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/date_calculator.py b/date_calculator.py
index 1920d30..aaae928 100644
--- a/date_calculator.py
+++ b/date_calculator.py
@@ -11,7 +11,8 @@ class DateCalculator:
# print(start)
# print(launch)
truncated_start = max(start, launch)
- considered_periods.append((truncated_start, end, id))
+ if truncated_start <= end:
+ considered_periods.append((truncated_start, end, id))
return considered_periods
@staticmethod