Like itermonthdates(), but will yield (year, month, day) tuples. Can be used for dates outside of datetime.date range.
(self, year, month)
| 246 | yield d, i % 7 |
| 247 | |
| 248 | def itermonthdays3(self, year, month): |
| 249 | """ |
| 250 | Like itermonthdates(), but will yield (year, month, day) tuples. Can be |
| 251 | used for dates outside of datetime.date range. |
| 252 | """ |
| 253 | day1, ndays = monthrange(year, month) |
| 254 | days_before = (day1 - self.firstweekday) % 7 |
| 255 | days_after = (self.firstweekday - day1 - ndays) % 7 |
| 256 | y, m = _prevmonth(year, month) |
| 257 | end = _monthlen(y, m) + 1 |
| 258 | for d in range(end-days_before, end): |
| 259 | yield y, m, d |
| 260 | for d in range(1, ndays + 1): |
| 261 | yield year, month, d |
| 262 | y, m = _nextmonth(year, month) |
| 263 | for d in range(1, days_after + 1): |
| 264 | yield y, m, d |
| 265 | |
| 266 | def itermonthdays4(self, year, month): |
| 267 | """ |