Return a month's calendar string (multi-line).
(self, theyear, themonth, w=0, l=0)
| 408 | print(self.formatmonth(theyear, themonth, w, l), end='') |
| 409 | |
| 410 | def formatmonth(self, theyear, themonth, w=0, l=0): |
| 411 | """ |
| 412 | Return a month's calendar string (multi-line). |
| 413 | """ |
| 414 | w = max(2, w) |
| 415 | l = max(1, l) |
| 416 | s = self.formatmonthname(theyear, themonth, 7 * (w + 1) - 1) |
| 417 | s = s.rstrip() |
| 418 | s += '\n' * l |
| 419 | s += self.formatweekheader(w).rstrip() |
| 420 | s += '\n' * l |
| 421 | for week in self.monthdays2calendar(theyear, themonth): |
| 422 | s += self.formatweek(week, w).rstrip() |
| 423 | s += '\n' * l |
| 424 | return s |
| 425 | |
| 426 | def formatyear(self, theyear, w=2, l=1, c=6, m=3): |
| 427 | """ |