class calendar.HTMLCalendar(firstweekday=0)
This class can be used to generate HTML calendars.
HTMLCalendar
instances have the following methods:
-
formatmonth(theyear, themonth, withyear=True)
-
Return a month’s calendar as an HTML table. If withyear is true the year will be included in the header, otherwise just the month name will be used.
-
formatyear(theyear, width=3)
-
Return a year’s calendar as an HTML table. width (defaulting to 3) specifies the number of months per row.
-
formatyearpage(theyear, width=3, css='calendar.css', encoding=None)
-
Return a year’s calendar as a complete HTML page. width (defaulting to 3) specifies the number of months per row. css is the name for the cascading style sheet to be used.
None
can be passed if no style sheet should be used. encoding specifies the encoding to be used for the output (defaulting to the system default encoding).
Please login to continue.