浏览代码

fix behavior of combining end date and max weeks

Justin Tracey 5 年之前
父节点
当前提交
74c6aedd1c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      vice-speaker-rotator.py

+ 1 - 1
vice-speaker-rotator.py

@@ -38,7 +38,7 @@ class CryspCalendar:
         if end:
             last_meeting = str_to_date(end)
         if weeks:
-            last_meeting = max(first_meeting + timedelta(weeks=weeks),
+            last_meeting = min(first_meeting + timedelta(weeks=weeks),
                                last_meeting)
         ret = []
         next_meeting = first_meeting