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 it as per your requirement.
Function | Description |
---|---|
formatmonth() | This method is used to get the month’s calendar in a multi-line string |
prmonth() | This method is used to print a month’s calendar as returned by formatmonth() |
formatyear() | This method is used to get m-column calendar for an entire year as a multi-line string |
pryear() | This method is used to print the calendar for an entire year as returned by formatmonth() |
Python | Calendar Module
Python defines an inbuilt module calendar that handles operations related to the calendar. In this article, we will see the Python Program to Display Calendar.