From 98b2fa72b9f56ab415ec46d15cecd1898b9b2db1 Mon Sep 17 00:00:00 2001 From: matin Date: Thu, 11 Sep 2025 23:45:16 +0200 Subject: fixed bug: negative periods --- date_calculator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'date_calculator.py') 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 -- cgit v1.1