- commit
- 423b7905ed47e208eaf285043b9940995b93133b
- parent
- de82084159b06d038b3de7ebb5663f11fb4f0bcb
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2017-12-23 10:43
use next year on non-repeating %m/%d if month is in the past
Diffstat
| M | cal.py | 2 | ++ |
1 files changed, 2 insertions, 0 deletions
diff --git a/cal.py b/cal.py
@@ -151,6 +151,8 @@ def parse_date(s): 151 151 tpl = {'day': _d.day, 'month': _d.month} 152 152 if not s.endswith('*'): 153 153 tpl['year'] = TODAY.year -1 154 if _d.month < TODAY.month: -1 155 tpl['year'] += 1 154 156 return tpl 155 157 except ValueError: 156 158 pass