'Return a formatted year as a table of tables.'

def formatyear(self, theyear, width=3):

    v = []
    a = v.append
    width = max(width, 1)
    a('<table    border="0"    cellpadding="0"    cellspacing="0"    class="year">')
    a('\n')
    a(('<tr><th    colspan="%d"    class="year">%s</th></tr>' % (width, theyear)))
    for i in range(January, (January + 12), width):
        months = range(i, min((i + width), 13))
        a('<tr>')
        for m in months:
            a('<td>')
            a(self.formatmonth(theyear, m, withyear=False))
            a('</td>')
        a('</tr>')
    a('</table>')
    return ''.join(v)
