aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xblue.py5
1 files changed, 5 insertions, 0 deletions
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)