From 72d84af401727711170a605ae5c82596f514f84e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Walter=20D=C3=B6rwald?= Date: Mon, 3 Apr 2006 15:21:59 +0000 Subject: [PATCH] Always return firstweekday % 7 instead of complaining on setting. --- Lib/calendar.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Lib/calendar.py b/Lib/calendar.py index 2b974bfa42..4965773c73 100644 --- a/Lib/calendar.py +++ b/Lib/calendar.py @@ -131,11 +131,9 @@ class Calendar(object): self.firstweekday = firstweekday # 0 = Monday, 6 = Sunday def getfirstweekday(self): - return self._firstweekday + return self._firstweekday % 7 def setfirstweekday(self, firstweekday): - if not MONDAY <= firstweekday <= SUNDAY: - raise IllegalWeekdayError(firstweekday) self._firstweekday = firstweekday firstweekday = property(getfirstweekday, setfirstweekday) -- 2.40.0