summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/calendar.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/calendar.py b/Lib/calendar.py
index 41537ba..1a4dbba 100644
--- a/Lib/calendar.py
+++ b/Lib/calendar.py
@@ -152,7 +152,7 @@ class Calendar(object):
while True:
yield date
date += oneday
- if date.month != month and date.weekday() == self.firstweekday:
+ if date.month != month and date.weekday() == self.firstweekday%7:
break
def itermonthdays2(self, year, month):