diff options
author | Mattias Andrée <maandree@kth.se> | 2016-07-07 07:01:22 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-07-07 07:01:22 +0200 |
commit | a0e7cbe99523447212a03a6e78990c6df4a8a4f9 (patch) | |
tree | e3007cec6a9d22992f297a3f8b57a071eadd2b50 /blue.py | |
parent | Commits got mixed up, this is: Fix error in days per months table (diff) | |
download | blue-a0e7cbe99523447212a03a6e78990c6df4a8a4f9.tar.gz blue-a0e7cbe99523447212a03a6e78990c6df4a8a4f9.tar.bz2 blue-a0e7cbe99523447212a03a6e78990c6df4a8a4f9.tar.xz |
m
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rwxr-xr-x | blue.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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) |