calendar.LocaleHTMLCalendar

class calendar.LocaleHTMLCalendar(firstweekday=0, locale=None) This subclass of HTMLCalendar can be passed a locale name in the constructor and will return month and weekday names in the specified locale. If this locale includes an encoding all strings containing month and weekday names will be returned as unicode.

calendar.leapdays()

calendar.leapdays(y1, y2) Returns the number of leap years in the range from y1 to y2 (exclusive), where y1 and y2 are years. This function works for ranges spanning a century change.

calendar.isleap()

calendar.isleap(year) Returns True if year is a leap year, otherwise False.

calendar.HTMLCalendar.formatyearpage()

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).

calendar.HTMLCalendar.formatyear()

formatyear(theyear, width=3) Return a year’s calendar as an HTML table. width (defaulting to 3) specifies the number of months per row.

calendar.HTMLCalendar.formatmonth()

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.

calendar.HTMLCalendar

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. format

calendar.firstweekday()

calendar.firstweekday() Returns the current setting for the weekday to start each week.

calendar.day_name

calendar.day_name An array that represents the days of the week in the current locale.

calendar.day_abbr

calendar.day_abbr An array that represents the abbreviated days of the week in the current locale.