From 2253276d419f98ac848c27341d808bb61205bd87 Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Sat, 30 Dec 2017 12:27:39 +0100 Subject: [PATCH] Fix out of bound month in December --- modules/meteofrance/pages.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/meteofrance/pages.py b/modules/meteofrance/pages.py index b7f0c02cd6..f3a730cdb9 100644 --- a/modules/meteofrance/pages.py +++ b/modules/meteofrance/pages.py @@ -58,7 +58,11 @@ def obj_date(self): '\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 -- GitLab