Xiang Zhang added the comment:

Something like this?

diff -r 15f82b64eee0 Lib/calendar.py
--- a/Lib/calendar.py   Thu Sep 22 17:11:53 2016 -0700
+++ b/Lib/calendar.py   Fri Sep 23 16:27:03 2016 +0800
@@ -181,6 +181,9 @@
                 yield (0, date.weekday())
             else:
                 yield (date.day, date.weekday())
+                if year == 9999 and month == 12 and date.day == 31:
+                    yield (0, 6)
+                    yield (0, 7)
 
     def itermonthdays(self, year, month):
         """

Is there a more elegant way? I considered this but didn't quite like it so 
abandoned it.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28253>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to