diff options
author | Walter Dörwald <walter@livinglogic.de> | 2006-04-03 15:21:59 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2006-04-03 15:21:59 (GMT) |
commit | 72d84af401727711170a605ae5c82596f514f84e (patch) | |
tree | 0230c3df6d9c2b6b213ff86e604d82ea08653917 /Lib | |
parent | aba10cf153193032a494dbd0667a1b86a32d821b (diff) | |
download | cpython-72d84af401727711170a605ae5c82596f514f84e.zip cpython-72d84af401727711170a605ae5c82596f514f84e.tar.gz cpython-72d84af401727711170a605ae5c82596f514f84e.tar.bz2 |
Always return firstweekday % 7 instead of complaining
on setting.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/calendar.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/calendar.py b/Lib/calendar.py index 2b974bf..4965773 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) |