Return a formatted year as a table of tables.
(self, theyear, width=3)
| 553 | return ''.join(v) |
| 554 | |
| 555 | def formatyear(self, theyear, width=3): |
| 556 | """ |
| 557 | Return a formatted year as a table of tables. |
| 558 | """ |
| 559 | v = [] |
| 560 | a = v.append |
| 561 | width = max(width, 1) |
| 562 | a(f'<table class="{self.cssclass_year}">') |
| 563 | a('\n') |
| 564 | a(f'<tr><th colspan="{width}" class="{self.cssclass_year_head}">{theyear}</th></tr>') |
| 565 | for i in range(JANUARY, JANUARY+12, width): |
| 566 | # months in this row |
| 567 | months = range(i, min(i+width, 13)) |
| 568 | a('<tr>') |
| 569 | for m in months: |
| 570 | a('<td>') |
| 571 | a(self.formatmonth(theyear, m, withyear=False)) |
| 572 | a('</td>') |
| 573 | a('</tr>') |
| 574 | a('</table>') |
| 575 | return ''.join(v) |
| 576 | |
| 577 | def _format_html_page(self, theyear, content, css, encoding): |
| 578 | """ |
no test coverage detected