import common def html(entries, date): colour_class = f"month-{date.month:02d}" list_of_entries = ( "
    " + "".join( ("
  1. " + common.link_to_entry(entry) + "
  2. ") for entry in entries if entries[entry]["date"].year == date.year and entries[entry]["date"].month == date.month and entries[entry]["date"].day == date.day ) + "
" ) list_of_dates = ( "

Years:

" + "
    " + "".join( ("
  1. " + f'{year:%Y}' + "
  2. ") for year in common.years ) + "
" + "

Months:

" + "
    " + "".join( ( "
  1. " + f'{month:%B}' + "
  2. " ) for month in common.months if month.year == date.year ) + "
" + "

Days:

" + "
    " + "".join( ( "
  1. " + ( f"{day:%d}" if day.day == date.day else f'{day:%d}' ) + "
  2. " ) for day in common.days if day.year == date.year and day.month == date.month ) + "
" ) return common.print_html( f""" {common.head} {common.title(f"{date:%d %B %Y}")}

{date:%d %B %Y}


{common.footer} """ )