Monday, 11 July 2016

Python: HTMLCalendar: Generate HTML calendars

calendar.HTMLCalendar(firstweekday=0)
‘HTMLCalendar’ is used to generate calendar information in HTML format.

Following table summarizes the methods in HTMLCalendar class.
Method
Description
formatmonth(theyear, themonth, withyear=True)
Return month calendar as html table. If the parameter withyear is set to true, then year is used in table header else month is used.
formatyear(theyear, width=3)
Get the year calendar as HTML table, width specifies the number of months per row. By default width is set to 3.
formatyearpage(theyear, width=3, css='calendar.css', encoding=None)
Gets year calendar as complete html page. ‘width’ specifies the number of months per row. ‘css’ specifies the style sheet to use. Encoding to be used for the output is specified by encoding.





Previous                                                 Next                                                 Home

No comments:

Post a Comment