This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mjpieters
Recipients mjpieters
Date 2016-03-27.09:38:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1459071536.92.0.968744515291.issue26650@psf.upfronthosting.co.za>
In-reply-to
Content
For anything other than calendar.Calendar(0), many methods lead to OverflowError exceptions:

>>> import calendar
>>> c = calendar.Calendar(0)
>>> list(c.itermonthdays(1, 1))
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0, 0, 0, 0]
>>> c = calendar.Calendar(1)
>>> list(c.itermonthdays(1, 1))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/mjpieters/Development/Library/buildout.python/parts/opt/lib/python2.7/calendar.py", line 188, in itermonthdays
    for date in self.itermonthdates(year, month):
  File "/Users/mjpieters/Development/Library/buildout.python/parts/opt/lib/python2.7/calendar.py", line 160, in itermonthdates
    date -= datetime.timedelta(days=days)
OverflowError: date value out of range

This echoes a similar problem with year = 9999, see issue #15421
History
Date User Action Args
2016-03-27 09:38:56mjpieterssetrecipients: + mjpieters
2016-03-27 09:38:56mjpieterssetmessageid: <1459071536.92.0.968744515291.issue26650@psf.upfronthosting.co.za>
2016-03-27 09:38:56mjpieterslinkissue26650 messages
2016-03-27 09:38:56mjpieterscreate