From a0e7cbe99523447212a03a6e78990c6df4a8a4f9 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 7 Jul 2016 07:01:22 +0200 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- blue.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/blue.py b/blue.py index 8cf5b66..436f2cb 100755 --- a/blue.py +++ b/blue.py @@ -219,6 +219,11 @@ else: days = 29 if y % 400 == 0 or (y % 4 == 0 and not y % 100 == 0) else 28 days = [31, days, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] d = days[m - 1] + else: + days = 29 if y % 400 == 0 or (y % 4 == 0 and not y % 100 == 0) else 28 + days = [31, days, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] + if d > days[m - 1]: + d = days[m - 1] stop_date = (y, m, d) -- cgit v1.2.3-70-g09d2