Return a formatted year as a table of tables.
(self, theyear, width=3)
| 537 | return ''.join(v) |
| 538 | |
| 539 | def formatyear(self, theyear, width=3): |
| 540 | """ |
| 541 | Return a formatted year as a table of tables. |
| 542 | """ |
| 543 | v = [] |
| 544 | a = v.append |
| 545 | width = max(width, 1) |
| 546 | a('<table border="0" cellpadding="0" cellspacing="0" class="%s">' % |
| 547 | self.cssclass_year) |
| 548 | a('\n') |
| 549 | a('<tr><th colspan="%d" class="%s">%s</th></tr>' % ( |
| 550 | width, self.cssclass_year_head, theyear)) |
| 551 | for i in range(JANUARY, JANUARY+12, width): |
| 552 | # months in this row |
| 553 | months = range(i, min(i+width, 13)) |
| 554 | a('<tr>') |
| 555 | for m in months: |
| 556 | a('<td>') |
| 557 | a(self.formatmonth(theyear, m, withyear=False)) |
| 558 | a('</td>') |
| 559 | a('</tr>') |
| 560 | a('</table>') |
| 561 | return ''.join(v) |
| 562 | |
| 563 | def formatyearpage(self, theyear, width=3, css='calendar.css', encoding=None): |
| 564 | """ |
no test coverage detected