A Calendar object provides several methods that can be used for
preparing the calendar data for formatting. This class doesn’t do any
formatting itself. This is the job of subclasses. Calendar class allows
the calculations for various task based on date, month, and year.
Calendar class provides the following methods:
Functions:
1. class calendar.calendar:
Calendar class creates a Calendar object. A Calendar object provides
several methods that can be used for preparing the calendar data for
formatting. Calendar class allows the calculations for various task based on date,
month, and year. Calendar class provides the following methods:
iterweekdays()
itermonthdates()
itermonthdays()
itermonthdays2()
itermonthdays3()
itermonthdays4()
monthdatescalendar()
monthday2calendar()
monthdayscalendar()
yeardayscalendar()
yeardays2calendar()
yeardayscalendar()
2. class calendar.TextCalendar
TextCalendar class can be used to generate plain text calendars.
TextCalendar class in Python allows you to edit the calendar and use as
per your requirement.
formatmonth()
prmonth()
formatyear()
pryear()
3. class calendar.HTMLCalendar:
HTMLCalendar class can be used to generate HTML calendars. HTMLCalendar
class in Python allows you to edit the calendar and use as per your
requirement.
formatmonth()
formatyear()
formatyearpage()
4. simple TextCalendar class:
simple text calendars calendar module provides the following functions :