Message262514
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 |
|
Date |
User |
Action |
Args |
2016-03-27 09:38:56 | mjpieters | set | recipients:
+ mjpieters |
2016-03-27 09:38:56 | mjpieters | set | messageid: <1459071536.92.0.968744515291.issue26650@psf.upfronthosting.co.za> |
2016-03-27 09:38:56 | mjpieters | link | issue26650 messages |
2016-03-27 09:38:56 | mjpieters | create | |
|