Days returned will be tuples consisting of a day of the month number and a week day number. Calendar class provides the following methods:įunction Description iterweekdays() Returns an iterator for the week day numbers that will be used for one week itermonthdates() Returns an iterator for the month (1–12) in the year itermonthdays() Returns an iterator of a specified month and a year itermonthdays2() Method is used to get an iterator for the month in the year similar to itermonthdates(). Calendar class allows the calculations for various tasks based on date, month, and year. This class doesn’t do any formatting itself. A Calendar object provides several methods that can be used for preparing the calendar data for formatting. The calendar class creates a Calendar object.