Closes bpo-28292: Implemented Calendar.itermonthdays3() and itermonthdays4(). (#4079)
authorAlexander Belopolsky <abalkin@users.noreply.github.com>
Tue, 24 Oct 2017 17:17:10 +0000 (13:17 -0400)
committerGitHub <noreply@github.com>
Tue, 24 Oct 2017 17:17:10 +0000 (13:17 -0400)
commitfdd9b217c60b454ac6a82f02c8b0b551caeac88b
treed520a2e9344820bf8f7df0f1e0c4ec1882e4eff4
parenteab3ff72ebe79416cc032b8508ae13332955a157
Closes bpo-28292: Implemented Calendar.itermonthdays3() and itermonthdays4(). (#4079)

Calendar.itermonthdates() will now consistently raise an exception when a date falls outside of the 0001-01-01 through 9999-12-31 range. To support applications that cannot tolerate such exceptions, the new methods itermonthdays3() and itermonthdays4() are added. The new methods return tuples and are not restricted by the range supported by datetime.date.

Thanks @serhiy-storchaka for suggesting the itermonthdays4() method and for the review.
Doc/library/calendar.rst
Lib/calendar.py
Lib/test/test_calendar.py
Misc/NEWS.d/next/Library/2017-10-23-20-03-36.bpo-28292.1Gkim2.rst [new file with mode: 0644]