VOOZH about

URL: https://www.geeksforgeeks.org/python/python-calendar-module-itermonthdays-method/

⇱ Python calendar module : itermonthdays() method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Python calendar module : itermonthdays() method

Last Updated : 13 May, 2021

Calendar module allows to output calendars like program, and provides additional useful functions related to the calendar. Functions and classes defined in Calendar module use an idealized calendar, the current Gregorian calendar extended indefinitely in both directions. 

itermonthdays() method returns an iterator of a specified month and a year. Days returned will simply be day numbers. itermonthdays() method is similar to itermonthdates(). 

Syntax: itermonthdays(year, month)

Parameter: 
year: year of the calendar
month: month of the calendar

Returns: an iterator of the specified month.


Code #1: 

Output: 

0
0
0
0
0
1
2
3
4
5
6
.
.
29
30


Code #2: 

Output: 

0
0
0
0
1
2
3
4
5
.
.
28
29
30
0


 

Comment