Commit 2253276d authored by Phyks (Lucas Verney)'s avatar Phyks (Lucas Verney) Committed by Romain Bignon

Fix out of bound month in December

parent 82d8e800
Pipeline #1018 failed with stages
in 62 minutes and 32 seconds
......@@ -58,7 +58,11 @@ class WeatherPage(HTMLPage):
'\w{3} (\d+)'))(self)
base_date = date.today()
if base_date.day > actual_day_number:
base_date = base_date.replace(month=base_date.month + 1)
base_date = base_date.replace(
month=(
(base_date.month + 1) % 12
)
)
base_date = base_date.replace(day=actual_day_number)
return base_date
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment