'HTML Representation'

def html(self, r, **attr):

    T = current.T
    now = current.request.now
    timedelta = datetime.timedelta
    days = ((now - timedelta(days=1)), now, (now + timedelta(days=1)), (now + timedelta(days=2)), (now + timedelta(days=3)), (now + timedelta(days=4)), (now + timedelta(days=5)))
    posts = self._extract(days, r, **attr)
    item = TABLE()
    title_row = TR()
    rappend = title_row.append
    for day in days:
        rappend(TD(day.strftime('%A')))
    item.append(title_row)
    for row in posts:
        data_row = TR()
        rappend = data_row.append
        row.reverse()
        for day in days:
            post = row.pop()
            if post:
                rappend(TD(self.post_layout(post)))
            else:
                rappend(TD())
        item.append(data_row)
    output = dict(item=item)
    output['title'] = T('Weekly    Schedule')
    if ('rheader' in attr):
        rheader = attr['rheader'](r)
        if rheader:
            output['rheader'] = rheader
    current.response.view = 'simple.html'
    return output
