Return a month's calendar string (multi-line).
(self, theyear, themonth, w=0, l=0)
| 352 | print(self.formatmonth(theyear, themonth, w, l), end='') |
| 353 | |
| 354 | def formatmonth(self, theyear, themonth, w=0, l=0): |
| 355 | """ |
| 356 | Return a month's calendar string (multi-line). |
| 357 | """ |
| 358 | w = max(2, w) |
| 359 | l = max(1, l) |
| 360 | s = self.formatmonthname(theyear, themonth, 7 * (w + 1) - 1) |
| 361 | s = s.rstrip() |
| 362 | s += '\n' * l |
| 363 | s += self.formatweekheader(w).rstrip() |
| 364 | s += '\n' * l |
| 365 | for week in self.monthdays2calendar(theyear, themonth): |
| 366 | s += self.formatweek(week, w).rstrip() |
| 367 | s += '\n' * l |
| 368 | return s |
| 369 | |
| 370 | def formatyear(self, theyear, w=2, l=1, c=6, m=3): |
| 371 | """ |
no test coverage detected