Calendar Module:
The calendar module allows you to output calendars like a program and includes extra calendar-related operations. Calendar module functions and classes make use of an idealized calendar, the current Gregorian calendar extended in both directions indefinitely.
yeardayscalendar() Method:
The yeardayscalendar() method returns data for the given year that is ready for formatting. The method is similar to the yeardatescalendar() method.
Entries in the week lists are day numbers. Outside of this month, day numbers are zero.
Syntax:
yeardayscalendar(year, width)
Parameter Values:
year:Â This is required. It is a number. The year for which the calendar should be created.
width: This is required. It is a number. The number of months that should be included in each row. 3 is the default.
Return Value: This function returns a list of day numbers.
Program for calendar yeardayscalendar() Method with Examples in Python
Method #1: Using Built-in Functions (Static Input)
Example1: Using For Loop
Approach:
- Import calendar module using the import keyword.
- Give the year as static input and store it in a variable.
- Give the width as static input and store it in another variable.
- Call the Calendar() function and store it in another variable.
- Apply yeardatescalendar() method to the above calendar by passing the given year, width as the arguments, and store it in another variable.
- Iterate in the above result using the for loop.
- Inside the loop, print the iterator value.
- The Exit of the Program.
Below is the implementation:
# Import calendar module using the import keyword. import calendar # Give the year as static input and store it in a variable. gvn_yr = 2017 # Give the width as static input and store it in another variable. gvn_widt = 2 # Call the Calendar() function and store it in another variable. calendr = calendar.Calendar() # Apply yeardatescalendar() method to the above calendar by passing the given year, # width as the arguments and store it in another variable. rslt = calendr.yeardatescalendar(gvn_yr, gvn_widt) # Iterate in the above result using the for loop. for itr in rslt: # Inside the loop, print the iterator value. print(itr)
Output:
[[[datetime.date(2016, 12, 26), datetime.date(2016, 12, 27), datetime.date(2016, 12, 28), datetime.date(2016, 12, 29), datetime.date(2016, 12, 30), datetime.date(2016, 12, 31), datetime.date(2017, 1, 1)], [datetime.date(2017, 1, 2), datetime.date(2017, 1, 3), datetime.date(2017, 1, 4), datetime.date(2017, 1, 5), datetime.date(2017, 1, 6), datetime.date(2017, 1, 7), datetime.date(2017, 1, 8)], [datetime.date(2017, 1, 9), datetime.date(2017, 1, 10), datetime.date(2017, 1, 11), datetime.date(2017, 1, 12), datetime.date(2017, 1, 13), datetime.date(2017, 1, 14), datetime.date(2017, 1, 15)], [datetime.date(2017, 1, 16), datetime.date(2017, 1, 17), datetime.date(2017, 1, 18), datetime.date(2017, 1, 19), datetime.date(2017, 1, 20), datetime.date(2017, 1, 21), datetime.date(2017, 1, 22)], [datetime.date(2017, 1, 23), datetime.date(2017, 1, 24), datetime.date(2017, 1, 25), datetime.date(2017, 1, 26), datetime.date(2017, 1, 27), datetime.date(2017, 1, 28), datetime.date(2017, 1, 29)], [datetime.date(2017, 1, 30), datetime.date(2017, 1, 31), datetime.date(2017, 2, 1), datetime.date(2017, 2, 2), datetime.date(2017, 2, 3), datetime.date(2017, 2, 4), datetime.date(2017, 2, 5)]], [[datetime.date(2017, 1, 30), datetime.date(2017, 1, 31), datetime.date(2017, 2, 1), datetime.date(2017, 2, 2), datetime.date(2017, 2, 3), datetime.date(2017, 2, 4), datetime.date(2017, 2, 5)], [datetime.date(2017, 2, 6), datetime.date(2017, 2, 7), datetime.date(2017, 2, 8), datetime.date(2017, 2, 9), datetime.date(2017, 2, 10), datetime.date(2017, 2, 11), datetime.date(2017, 2, 12)], [datetime.date(2017, 2, 13), datetime.date(2017, 2, 14), datetime.date(2017, 2, 15), datetime.date(2017, 2, 16), datetime.date(2017, 2, 17), datetime.date(2017, 2, 18), datetime.date(2017, 2, 19)], [datetime.date(2017, 2, 20), datetime.date(2017, 2, 21), datetime.date(2017, 2, 22), datetime.date(2017, 2, 23), datetime.date(2017, 2, 24), datetime.date(2017, 2, 25), datetime.date(2017, 2, 26)], [datetime.date(2017, 2, 27), datetime.date(2017, 2, 28), datetime.date(2017, 3, 1), datetime.date(2017, 3, 2), datetime.date(2017, 3, 3), datetime.date(2017, 3, 4), datetime.date(2017, 3, 5)]]] [[[datetime.date(2017, 2, 27), datetime.date(2017, 2, 28), datetime.date(2017, 3, 1), datetime.date(2017, 3, 2), datetime.date(2017, 3, 3), datetime.date(2017, 3, 4), datetime.date(2017, 3, 5)], [datetime.date(2017, 3, 6), datetime.date(2017, 3, 7), datetime.date(2017, 3, 8), datetime.date(2017, 3, 9), datetime.date(2017, 3, 10), datetime.date(2017, 3, 11), datetime.date(2017, 3, 12)], [datetime.date(2017, 3, 13), datetime.date(2017, 3, 14), datetime.date(2017, 3, 15), datetime.date(2017, 3, 16), datetime.date(2017, 3, 17), datetime.date(2017, 3, 18), datetime.date(2017, 3, 19)], [datetime.date(2017, 3, 20), datetime.date(2017, 3, 21), datetime.date(2017, 3, 22), datetime.date(2017, 3, 23), datetime.date(2017, 3, 24), datetime.date(2017, 3, 25), datetime.date(2017, 3, 26)], [datetime.date(2017, 3, 27), datetime.date(2017, 3, 28), datetime.date(2017, 3, 29), datetime.date(2017, 3, 30), datetime.date(2017, 3, 31), datetime.date(2017, 4, 1), datetime.date(2017, 4, 2)]], [[datetime.date(2017, 3, 27), datetime.date(2017, 3, 28), datetime.date(2017, 3, 29), datetime.date(2017, 3, 30), datetime.date(2017, 3, 31), datetime.date(2017, 4, 1), datetime.date(2017, 4, 2)], [datetime.date(2017, 4, 3), datetime.date(2017, 4, 4), datetime.date(2017, 4, 5), datetime.date(2017, 4, 6), datetime.date(2017, 4, 7), datetime.date(2017, 4, 8), datetime.date(2017, 4, 9)], [datetime.date(2017, 4, 10), datetime.date(2017, 4, 11), datetime.date(2017, 4, 12), datetime.date(2017, 4, 13), datetime.date(2017, 4, 14), datetime.date(2017, 4, 15), datetime.date(2017, 4, 16)], [datetime.date(2017, 4, 17), datetime.date(2017, 4, 18), datetime.date(2017, 4, 19), datetime.date(2017, 4, 20), datetime.date(2017, 4, 21), datetime.date(2017, 4, 22), datetime.date(2017, 4, 23)], [datetime.date(2017, 4, 24), datetime.date(2017, 4, 25), datetime.date(2017, 4, 26), datetime.date(2017, 4, 27), datetime.date(2017, 4, 28), datetime.date(2017, 4, 29), datetime.date(2017, 4, 30)]]] [[[datetime.date(2017, 5, 1), datetime.date(2017, 5, 2), datetime.date(2017, 5, 3), datetime.date(2017, 5, 4), datetime.date(2017, 5, 5), datetime.date(2017, 5, 6), datetime.date(2017, 5, 7)], [datetime.date(2017, 5, 8), datetime.date(2017, 5, 9), datetime.date(2017, 5, 10), datetime.date(2017, 5, 11), datetime.date(2017, 5, 12), datetime.date(2017, 5, 13), datetime.date(2017, 5, 14)], [datetime.date(2017, 5, 15), datetime.date(2017, 5, 16), datetime.date(2017, 5, 17), datetime.date(2017, 5, 18), datetime.date(2017, 5, 19), datetime.date(2017, 5, 20), datetime.date(2017, 5, 21)], [datetime.date(2017, 5, 22), datetime.date(2017, 5, 23), datetime.date(2017, 5, 24), datetime.date(2017, 5, 25), datetime.date(2017, 5, 26), datetime.date(2017, 5, 27), datetime.date(2017, 5, 28)], [datetime.date(2017, 5, 29), datetime.date(2017, 5, 30), datetime.date(2017, 5, 31), datetime.date(2017, 6, 1), datetime.date(2017, 6, 2), datetime.date(2017, 6, 3), datetime.date(2017, 6, 4)]], [[datetime.date(2017, 5, 29), datetime.date(2017, 5, 30), datetime.date(2017, 5, 31), datetime.date(2017, 6, 1), datetime.date(2017, 6, 2), datetime.date(2017, 6, 3), datetime.date(2017, 6, 4)], [datetime.date(2017, 6, 5), datetime.date(2017, 6, 6), datetime.date(2017, 6, 7), datetime.date(2017, 6, 8), datetime.date(2017, 6, 9), datetime.date(2017, 6, 10), datetime.date(2017, 6, 11)], [datetime.date(2017, 6, 12), datetime.date(2017, 6, 13), datetime.date(2017, 6, 14), datetime.date(2017, 6, 15), datetime.date(2017, 6, 16), datetime.date(2017, 6, 17), datetime.date(2017, 6, 18)], [datetime.date(2017, 6, 19), datetime.date(2017, 6, 20), datetime.date(2017, 6, 21), datetime.date(2017, 6, 22), datetime.date(2017, 6, 23), datetime.date(2017, 6, 24), datetime.date(2017, 6, 25)], [datetime.date(2017, 6, 26), datetime.date(2017, 6, 27), datetime.date(2017, 6, 28), datetime.date(2017, 6, 29), datetime.date(2017, 6, 30), datetime.date(2017, 7, 1), datetime.date(2017, 7, 2)]]] [[[datetime.date(2017, 6, 26), datetime.date(2017, 6, 27), datetime.date(2017, 6, 28), datetime.date(2017, 6, 29), datetime.date(2017, 6, 30), datetime.date(2017, 7, 1), datetime.date(2017, 7, 2)], [datetime.date(2017, 7, 3), datetime.date(2017, 7, 4), datetime.date(2017, 7, 5), datetime.date(2017, 7, 6), datetime.date(2017, 7, 7), datetime.date(2017, 7, 8), datetime.date(2017, 7, 9)], [datetime.date(2017, 7, 10), datetime.date(2017, 7, 11), datetime.date(2017, 7, 12), datetime.date(2017, 7, 13), datetime.date(2017, 7, 14), datetime.date(2017, 7, 15), datetime.date(2017, 7, 16)], [datetime.date(2017, 7, 17), datetime.date(2017, 7, 18), datetime.date(2017, 7, 19), datetime.date(2017, 7, 20), datetime.date(2017, 7, 21), datetime.date(2017, 7, 22), datetime.date(2017, 7, 23)], [datetime.date(2017, 7, 24), datetime.date(2017, 7, 25), datetime.date(2017, 7, 26), datetime.date(2017, 7, 27), datetime.date(2017, 7, 28), datetime.date(2017, 7, 29), datetime.date(2017, 7, 30)], [datetime.date(2017, 7, 31), datetime.date(2017, 8, 1), datetime.date(2017, 8, 2), datetime.date(2017, 8, 3), datetime.date(2017, 8, 4), datetime.date(2017, 8, 5), datetime.date(2017, 8, 6)]], [[datetime.date(2017, 7, 31), datetime.date(2017, 8, 1), datetime.date(2017, 8, 2), datetime.date(2017, 8, 3), datetime.date(2017, 8, 4), datetime.date(2017, 8, 5), datetime.date(2017, 8, 6)], [datetime.date(2017, 8, 7), datetime.date(2017, 8, 8), datetime.date(2017, 8, 9), datetime.date(2017, 8, 10), datetime.date(2017, 8, 11), datetime.date(2017, 8, 12), datetime.date(2017, 8, 13)], [datetime.date(2017, 8, 14), datetime.date(2017, 8, 15), datetime.date(2017, 8, 16), datetime.date(2017, 8, 17), datetime.date(2017, 8, 18), datetime.date(2017, 8, 19), datetime.date(2017, 8, 20)], [datetime.date(2017, 8, 21), datetime.date(2017, 8, 22), datetime.date(2017, 8, 23), datetime.date(2017, 8, 24), datetime.date(2017, 8, 25), datetime.date(2017, 8, 26), datetime.date(2017, 8, 27)], [datetime.date(2017, 8, 28), datetime.date(2017, 8, 29), datetime.date(2017, 8, 30), datetime.date(2017, 8, 31), datetime.date(2017, 9, 1), datetime.date(2017, 9, 2), datetime.date(2017, 9, 3)]]] [[[datetime.date(2017, 8, 28), datetime.date(2017, 8, 29), datetime.date(2017, 8, 30), datetime.date(2017, 8, 31), datetime.date(2017, 9, 1), datetime.date(2017, 9, 2), datetime.date(2017, 9, 3)], [datetime.date(2017, 9, 4), datetime.date(2017, 9, 5), datetime.date(2017, 9, 6), datetime.date(2017, 9, 7), datetime.date(2017, 9, 8), datetime.date(2017, 9, 9), datetime.date(2017, 9, 10)], [datetime.date(2017, 9, 11), datetime.date(2017, 9, 12), datetime.date(2017, 9, 13), datetime.date(2017, 9, 14), datetime.date(2017, 9, 15), datetime.date(2017, 9, 16), datetime.date(2017, 9, 17)], [datetime.date(2017, 9, 18), datetime.date(2017, 9, 19), datetime.date(2017, 9, 20), datetime.date(2017, 9, 21), datetime.date(2017, 9, 22), datetime.date(2017, 9, 23), datetime.date(2017, 9, 24)], [datetime.date(2017, 9, 25), datetime.date(2017, 9, 26), datetime.date(2017, 9, 27), datetime.date(2017, 9, 28), datetime.date(2017, 9, 29), datetime.date(2017, 9, 30), datetime.date(2017, 10, 1)]], [[datetime.date(2017, 9, 25), datetime.date(2017, 9, 26), datetime.date(2017, 9, 27), datetime.date(2017, 9, 28), datetime.date(2017, 9, 29), datetime.date(2017, 9, 30), datetime.date(2017, 10, 1)], [datetime.date(2017, 10, 2), datetime.date(2017, 10, 3), datetime.date(2017, 10, 4), datetime.date(2017, 10, 5), datetime.date(2017, 10, 6), datetime.date(2017, 10, 7), datetime.date(2017, 10, 8)], [datetime.date(2017, 10, 9), datetime.date(2017, 10, 10), datetime.date(2017, 10, 11), datetime.date(2017, 10, 12), datetime.date(2017, 10, 13), datetime.date(2017, 10, 14), datetime.date(2017, 10, 15)], [datetime.date(2017, 10, 16), datetime.date(2017, 10, 17), datetime.date(2017, 10, 18), datetime.date(2017, 10, 19), datetime.date(2017, 10, 20), datetime.date(2017, 10, 21), datetime.date(2017, 10, 22)], [datetime.date(2017, 10, 23), datetime.date(2017, 10, 24), datetime.date(2017, 10, 25), datetime.date(2017, 10, 26), datetime.date(2017, 10, 27), datetime.date(2017, 10, 28), datetime.date(2017, 10, 29)], [datetime.date(2017, 10, 30), datetime.date(2017, 10, 31), datetime.date(2017, 11, 1), datetime.date(2017, 11, 2), datetime.date(2017, 11, 3), datetime.date(2017, 11, 4), datetime.date(2017, 11, 5)]]] [[[datetime.date(2017, 10, 30), datetime.date(2017, 10, 31), datetime.date(2017, 11, 1), datetime.date(2017, 11, 2), datetime.date(2017, 11, 3), datetime.date(2017, 11, 4), datetime.date(2017, 11, 5)], [datetime.date(2017, 11, 6), datetime.date(2017, 11, 7), datetime.date(2017, 11, 8), datetime.date(2017, 11, 9), datetime.date(2017, 11, 10), datetime.date(2017, 11, 11), datetime.date(2017, 11, 12)], [datetime.date(2017, 11, 13), datetime.date(2017, 11, 14), datetime.date(2017, 11, 15), datetime.date(2017, 11, 16), datetime.date(2017, 11, 17), datetime.date(2017, 11, 18), datetime.date(2017, 11, 19)], [datetime.date(2017, 11, 20), datetime.date(2017, 11, 21), datetime.date(2017, 11, 22), datetime.date(2017, 11, 23), datetime.date(2017, 11, 24), datetime.date(2017, 11, 25), datetime.date(2017, 11, 26)], [datetime.date(2017, 11, 27), datetime.date(2017, 11, 28), datetime.date(2017, 11, 29), datetime.date(2017, 11, 30), datetime.date(2017, 12, 1), datetime.date(2017, 12, 2), datetime.date(2017, 12, 3)]], [[datetime.date(2017, 11, 27), datetime.date(2017, 11, 28), datetime.date(2017, 11, 29), datetime.date(2017, 11, 30), datetime.date(2017, 12, 1), datetime.date(2017, 12, 2), datetime.date(2017, 12, 3)], [datetime.date(2017, 12, 4), datetime.date(2017, 12, 5), datetime.date(2017, 12, 6), datetime.date(2017, 12, 7), datetime.date(2017, 12, 8), datetime.date(2017, 12, 9), datetime.date(2017, 12, 10)], [datetime.date(2017, 12, 11), datetime.date(2017, 12, 12), datetime.date(2017, 12, 13), datetime.date(2017, 12, 14), datetime.date(2017, 12, 15), datetime.date(2017, 12, 16), datetime.date(2017, 12, 17)], [datetime.date(2017, 12, 18), datetime.date(2017, 12, 19), datetime.date(2017, 12, 20), datetime.date(2017, 12, 21), datetime.date(2017, 12, 22), datetime.date(2017, 12, 23), datetime.date(2017, 12, 24)], [datetime.date(2017, 12, 25), datetime.date(2017, 12, 26), datetime.date(2017, 12, 27), datetime.date(2017, 12, 28), datetime.date(2017, 12, 29), datetime.date(2017, 12, 30), datetime.date(2017, 12, 31)]]]
Note:
If yoy do not give the width, the default value will be taken as 3.
Example2:
Approach:
- Import calendar module using the import keyword.
- Give the year as static input and store it in a variable.
- Give the width as static input and store it in another variable.
- Call the Calendar() function and store it in another variable.
- Apply yeardatescalendar() method to the above calendar by passing the given year, width as the arguments, and store it in another variable.
- Print the above result.
- The Exit of the Program.
Below is the implementation:
# Import calendar module using the import keyword. import calendar # Give the year as static input and store it in a variable. gvn_yr = 2012 # Give the width as static input and store it in another variable. gvn_widt = 4 # Call the Calendar() function and store it in another variable. calendr = calendar.Calendar() # Apply yeardatescalendar() method to the above calendar by passing the given year, # width as the arguments and store it in another variable. rslt = calendr.yeardatescalendar(gvn_yr, gvn_widt) # Print the above result. print(rslt)
Output:
[[[[datetime.date(2011, 12, 26), datetime.date(2011, 12, 27), datetime.date(2011, 12, 28), datetime.date(2011, 12, 29), datetime.date(2011, 12, 30), datetime.date(2011, 12, 31), datetime.date(2012, 1, 1)], [datetime.date(2012, 1, 2), datetime.date(2012, 1, 3), datetime.date(2012, 1, 4), datetime.date(2012, 1, 5), datetime.date(2012, 1, 6), datetime.date(2012, 1, 7), datetime.date(2012, 1, 8)], [datetime.date(2012, 1, 9), datetime.date(2012, 1, 10), datetime.date(2012, 1, 11), datetime.date(2012, 1, 12), datetime.date(2012, 1, 13), datetime.date(2012, 1, 14), datetime.date(2012, 1, 15)], [datetime.date(2012, 1, 16), datetime.date(2012, 1, 17), datetime.date(2012, 1, 18), datetime.date(2012, 1, 19), datetime.date(2012, 1, 20), datetime.date(2012, 1, 21), datetime.date(2012, 1, 22)], [datetime.date(2012, 1, 23), datetime.date(2012, 1, 24), datetime.date(2012, 1, 25), datetime.date(2012, 1, 26), datetime.date(2012, 1, 27), datetime.date(2012, 1, 28), datetime.date(2012, 1, 29)], [datetime.date(2012, 1, 30), datetime.date(2012, 1, 31), datetime.date(2012, 2, 1), datetime.date(2012, 2, 2), datetime.date(2012, 2, 3), datetime.date(2012, 2, 4), datetime.date(2012, 2, 5)]], [[datetime.date(2012, 1, 30), datetime.date(2012, 1, 31), datetime.date(2012, 2, 1), datetime.date(2012, 2, 2), datetime.date(2012, 2, 3), datetime.date(2012, 2, 4), datetime.date(2012, 2, 5)], [datetime.date(2012, 2, 6), datetime.date(2012, 2, 7), datetime.date(2012, 2, 8), datetime.date(2012, 2, 9), datetime.date(2012, 2, 10), datetime.date(2012, 2, 11), datetime.date(2012, 2, 12)], [datetime.date(2012, 2, 13), datetime.date(2012, 2, 14), datetime.date(2012, 2, 15), datetime.date(2012, 2, 16), datetime.date(2012, 2, 17), datetime.date(2012, 2, 18), datetime.date(2012, 2, 19)], [datetime.date(2012, 2, 20), datetime.date(2012, 2, 21), datetime.date(2012, 2, 22), datetime.date(2012, 2, 23), datetime.date(2012, 2, 24), datetime.date(2012, 2, 25), datetime.date(2012, 2, 26)], [datetime.date(2012, 2, 27), datetime.date(2012, 2, 28), datetime.date(2012, 2, 29), datetime.date(2012, 3, 1), datetime.date(2012, 3, 2), datetime.date(2012, 3, 3), datetime.date(2012, 3, 4)]], [[datetime.date(2012, 2, 27), datetime.date(2012, 2, 28), datetime.date(2012, 2, 29), datetime.date(2012, 3, 1), datetime.date(2012, 3, 2), datetime.date(2012, 3, 3), datetime.date(2012, 3, 4)], [datetime.date(2012, 3, 5), datetime.date(2012, 3, 6), datetime.date(2012, 3, 7), datetime.date(2012, 3, 8), datetime.date(2012, 3, 9), datetime.date(2012, 3, 10), datetime.date(2012, 3, 11)], [datetime.date(2012, 3, 12), datetime.date(2012, 3, 13), datetime.date(2012, 3, 14), datetime.date(2012, 3, 15), datetime.date(2012, 3, 16), datetime.date(2012, 3, 17), datetime.date(2012, 3, 18)], [datetime.date(2012, 3, 19), datetime.date(2012, 3, 20), datetime.date(2012, 3, 21), datetime.date(2012, 3, 22), datetime.date(2012, 3, 23), datetime.date(2012, 3, 24), datetime.date(2012, 3, 25)], [datetime.date(2012, 3, 26), datetime.date(2012, 3, 27), datetime.date(2012, 3, 28), datetime.date(2012, 3, 29), datetime.date(2012, 3, 30), datetime.date(2012, 3, 31), datetime.date(2012, 4, 1)]], [[datetime.date(2012, 3, 26), datetime.date(2012, 3, 27), datetime.date(2012, 3, 28), datetime.date(2012, 3, 29), datetime.date(2012, 3, 30), datetime.date(2012, 3, 31), datetime.date(2012, 4, 1)], [datetime.date(2012, 4, 2), datetime.date(2012, 4, 3), datetime.date(2012, 4, 4), datetime.date(2012, 4, 5), datetime.date(2012, 4, 6), datetime.date(2012, 4, 7), datetime.date(2012, 4, 8)], [datetime.date(2012, 4, 9), datetime.date(2012, 4, 10), datetime.date(2012, 4, 11), datetime.date(2012, 4, 12), datetime.date(2012, 4, 13), datetime.date(2012, 4, 14), datetime.date(2012, 4, 15)], [datetime.date(2012, 4, 16), datetime.date(2012, 4, 17), datetime.date(2012, 4, 18), datetime.date(2012, 4, 19), datetime.date(2012, 4, 20), datetime.date(2012, 4, 21), datetime.date(2012, 4, 22)], [datetime.date(2012, 4, 23), datetime.date(2012, 4, 24), datetime.date(2012, 4, 25), datetime.date(2012, 4, 26), datetime.date(2012, 4, 27), datetime.date(2012, 4, 28), datetime.date(2012, 4, 29)], [datetime.date(2012, 4, 30), datetime.date(2012, 5, 1), datetime.date(2012, 5, 2), datetime.date(2012, 5, 3), datetime.date(2012, 5, 4), datetime.date(2012, 5, 5), datetime.date(2012, 5, 6)]]], [[[datetime.date(2012, 4, 30), datetime.date(2012, 5, 1), datetime.date(2012, 5, 2), datetime.date(2012, 5, 3), datetime.date(2012, 5, 4), datetime.date(2012, 5, 5), datetime.date(2012, 5, 6)], [datetime.date(2012, 5, 7), datetime.date(2012, 5, 8), datetime.date(2012, 5, 9), datetime.date(2012, 5, 10), datetime.date(2012, 5, 11), datetime.date(2012, 5, 12), datetime.date(2012, 5, 13)], [datetime.date(2012, 5, 14), datetime.date(2012, 5, 15), datetime.date(2012, 5, 16), datetime.date(2012, 5, 17), datetime.date(2012, 5, 18), datetime.date(2012, 5, 19), datetime.date(2012, 5, 20)], [datetime.date(2012, 5, 21), datetime.date(2012, 5, 22), datetime.date(2012, 5, 23), datetime.date(2012, 5, 24), datetime.date(2012, 5, 25), datetime.date(2012, 5, 26), datetime.date(2012, 5, 27)], [datetime.date(2012, 5, 28), datetime.date(2012, 5, 29), datetime.date(2012, 5, 30), datetime.date(2012, 5, 31), datetime.date(2012, 6, 1), datetime.date(2012, 6, 2), datetime.date(2012, 6, 3)]], [[datetime.date(2012, 5, 28), datetime.date(2012, 5, 29), datetime.date(2012, 5, 30), datetime.date(2012, 5, 31), datetime.date(2012, 6, 1), datetime.date(2012, 6, 2), datetime.date(2012, 6, 3)], [datetime.date(2012, 6, 4), datetime.date(2012, 6, 5), datetime.date(2012, 6, 6), datetime.date(2012, 6, 7), datetime.date(2012, 6, 8), datetime.date(2012, 6, 9), datetime.date(2012, 6, 10)], [datetime.date(2012, 6, 11), datetime.date(2012, 6, 12), datetime.date(2012, 6, 13), datetime.date(2012, 6, 14), datetime.date(2012, 6, 15), datetime.date(2012, 6, 16), datetime.date(2012, 6, 17)], [datetime.date(2012, 6, 18), datetime.date(2012, 6, 19), datetime.date(2012, 6, 20), datetime.date(2012, 6, 21), datetime.date(2012, 6, 22), datetime.date(2012, 6, 23), datetime.date(2012, 6, 24)], [datetime.date(2012, 6, 25), datetime.date(2012, 6, 26), datetime.date(2012, 6, 27), datetime.date(2012, 6, 28), datetime.date(2012, 6, 29), datetime.date(2012, 6, 30), datetime.date(2012, 7, 1)]], [[datetime.date(2012, 6, 25), datetime.date(2012, 6, 26), datetime.date(2012, 6, 27), datetime.date(2012, 6, 28), datetime.date(2012, 6, 29), datetime.date(2012, 6, 30), datetime.date(2012, 7, 1)], [datetime.date(2012, 7, 2), datetime.date(2012, 7, 3), datetime.date(2012, 7, 4), datetime.date(2012, 7, 5), datetime.date(2012, 7, 6), datetime.date(2012, 7, 7), datetime.date(2012, 7, 8)], [datetime.date(2012, 7, 9), datetime.date(2012, 7, 10), datetime.date(2012, 7, 11), datetime.date(2012, 7, 12), datetime.date(2012, 7, 13), datetime.date(2012, 7, 14), datetime.date(2012, 7, 15)], [datetime.date(2012, 7, 16), datetime.date(2012, 7, 17), datetime.date(2012, 7, 18), datetime.date(2012, 7, 19), datetime.date(2012, 7, 20), datetime.date(2012, 7, 21), datetime.date(2012, 7, 22)], [datetime.date(2012, 7, 23), datetime.date(2012, 7, 24), datetime.date(2012, 7, 25), datetime.date(2012, 7, 26), datetime.date(2012, 7, 27), datetime.date(2012, 7, 28), datetime.date(2012, 7, 29)], [datetime.date(2012, 7, 30), datetime.date(2012, 7, 31), datetime.date(2012, 8, 1), datetime.date(2012, 8, 2), datetime.date(2012, 8, 3), datetime.date(2012, 8, 4), datetime.date(2012, 8, 5)]], [[datetime.date(2012, 7, 30), datetime.date(2012, 7, 31), datetime.date(2012, 8, 1), datetime.date(2012, 8, 2), datetime.date(2012, 8, 3), datetime.date(2012, 8, 4), datetime.date(2012, 8, 5)], [datetime.date(2012, 8, 6), datetime.date(2012, 8, 7), datetime.date(2012, 8, 8), datetime.date(2012, 8, 9), datetime.date(2012, 8, 10), datetime.date(2012, 8, 11), datetime.date(2012, 8, 12)], [datetime.date(2012, 8, 13), datetime.date(2012, 8, 14), datetime.date(2012, 8, 15), datetime.date(2012, 8, 16), datetime.date(2012, 8, 17), datetime.date(2012, 8, 18), datetime.date(2012, 8, 19)], [datetime.date(2012, 8, 20), datetime.date(2012, 8, 21), datetime.date(2012, 8, 22), datetime.date(2012, 8, 23), datetime.date(2012, 8, 24), datetime.date(2012, 8, 25), datetime.date(2012, 8, 26)], [datetime.date(2012, 8, 27), datetime.date(2012, 8, 28), datetime.date(2012, 8, 29), datetime.date(2012, 8, 30), datetime.date(2012, 8, 31), datetime.date(2012, 9, 1), datetime.date(2012, 9, 2)]]], [[[datetime.date(2012, 8, 27), datetime.date(2012, 8, 28), datetime.date(2012, 8, 29), datetime.date(2012, 8, 30), datetime.date(2012, 8, 31), datetime.date(2012, 9, 1), datetime.date(2012, 9, 2)], [datetime.date(2012, 9, 3), datetime.date(2012, 9, 4), datetime.date(2012, 9, 5), datetime.date(2012, 9, 6), datetime.date(2012, 9, 7), datetime.date(2012, 9, 8), datetime.date(2012, 9, 9)], [datetime.date(2012, 9, 10), datetime.date(2012, 9, 11), datetime.date(2012, 9, 12), datetime.date(2012, 9, 13), datetime.date(2012, 9, 14), datetime.date(2012, 9, 15), datetime.date(2012, 9, 16)], [datetime.date(2012, 9, 17), datetime.date(2012, 9, 18), datetime.date(2012, 9, 19), datetime.date(2012, 9, 20), datetime.date(2012, 9, 21), datetime.date(2012, 9, 22), datetime.date(2012, 9, 23)], [datetime.date(2012, 9, 24), datetime.date(2012, 9, 25), datetime.date(2012, 9, 26), datetime.date(2012, 9, 27), datetime.date(2012, 9, 28), datetime.date(2012, 9, 29), datetime.date(2012, 9, 30)]], [[datetime.date(2012, 10, 1), datetime.date(2012, 10, 2), datetime.date(2012, 10, 3), datetime.date(2012, 10, 4), datetime.date(2012, 10, 5), datetime.date(2012, 10, 6), datetime.date(2012, 10, 7)], [datetime.date(2012, 10, 8), datetime.date(2012, 10, 9), datetime.date(2012, 10, 10), datetime.date(2012, 10, 11), datetime.date(2012, 10, 12), datetime.date(2012, 10, 13), datetime.date(2012, 10, 14)], [datetime.date(2012, 10, 15), datetime.date(2012, 10, 16), datetime.date(2012, 10, 17), datetime.date(2012, 10, 18), datetime.date(2012, 10, 19), datetime.date(2012, 10, 20), datetime.date(2012, 10, 21)], [datetime.date(2012, 10, 22), datetime.date(2012, 10, 23), datetime.date(2012, 10, 24), datetime.date(2012, 10, 25), datetime.date(2012, 10, 26), datetime.date(2012, 10, 27), datetime.date(2012, 10, 28)], [datetime.date(2012, 10, 29), datetime.date(2012, 10, 30), datetime.date(2012, 10, 31), datetime.date(2012, 11, 1), datetime.date(2012, 11, 2), datetime.date(2012, 11, 3), datetime.date(2012, 11, 4)]], [[datetime.date(2012, 10, 29), datetime.date(2012, 10, 30), datetime.date(2012, 10, 31), datetime.date(2012, 11, 1), datetime.date(2012, 11, 2), datetime.date(2012, 11, 3), datetime.date(2012, 11, 4)], [datetime.date(2012, 11, 5), datetime.date(2012, 11, 6), datetime.date(2012, 11, 7), datetime.date(2012, 11, 8), datetime.date(2012, 11, 9), datetime.date(2012, 11, 10), datetime.date(2012, 11, 11)], [datetime.date(2012, 11, 12), datetime.date(2012, 11, 13), datetime.date(2012, 11, 14), datetime.date(2012, 11, 15), datetime.date(2012, 11, 16), datetime.date(2012, 11, 17), datetime.date(2012, 11, 18)], [datetime.date(2012, 11, 19), datetime.date(2012, 11, 20), datetime.date(2012, 11, 21), datetime.date(2012, 11, 22), datetime.date(2012, 11, 23), datetime.date(2012, 11, 24), datetime.date(2012, 11, 25)], [datetime.date(2012, 11, 26), datetime.date(2012, 11, 27), datetime.date(2012, 11, 28), datetime.date(2012, 11, 29), datetime.date(2012, 11, 30), datetime.date(2012, 12, 1), datetime.date(2012, 12, 2)]], [[datetime.date(2012, 11, 26), datetime.date(2012, 11, 27), datetime.date(2012, 11, 28), datetime.date(2012, 11, 29), datetime.date(2012, 11, 30), datetime.date(2012, 12, 1), datetime.date(2012, 12, 2)], [datetime.date(2012, 12, 3), datetime.date(2012, 12, 4), datetime.date(2012, 12, 5), datetime.date(2012, 12, 6), datetime.date(2012, 12, 7), datetime.date(2012, 12, 8), datetime.date(2012, 12, 9)], [datetime.date(2012, 12, 10), datetime.date(2012, 12, 11), datetime.date(2012, 12, 12), datetime.date(2012, 12, 13), datetime.date(2012, 12, 14), datetime.date(2012, 12, 15), datetime.date(2012, 12, 16)], [datetime.date(2012, 12, 17), datetime.date(2012, 12, 18), datetime.date(2012, 12, 19), datetime.date(2012, 12, 20), datetime.date(2012, 12, 21), datetime.date(2012, 12, 22), datetime.date(2012, 12, 23)], [datetime.date(2012, 12, 24), datetime.date(2012, 12, 25), datetime.date(2012, 12, 26), datetime.date(2012, 12, 27), datetime.date(2012, 12, 28), datetime.date(2012, 12, 29), datetime.date(2012, 12, 30)], [datetime.date(2012, 12, 31), datetime.date(2013, 1, 1), datetime.date(2013, 1, 2), datetime.date(2013, 1, 3), datetime.date(2013, 1, 4), datetime.date(2013, 1, 5), datetime.date(2013, 1, 6)]]]]
Method #2: Using Built-in Functions (User Input)
Example1: Using For Loop
Approach:
- Import calendar module using the import keyword.
- Give the year as user input using the int(input()) function and store it in a variable.
- Give the width as user input using the int(input()) function and store it in another variable.
- Call the Calendar() function and store it in another variable.
- Apply yeardatescalendar() method to the above calendar by passing the given year, width as the arguments, and store it in another variable.
- Iterate in the above result using the for loop.
- Inside the loop, print the iterator value.
- The Exit of the Program.
Below is the implementation:
# Import calendar module using the import keyword. import calendar # Give the year as user input using the int(input()) function and store it in a variable. gvn_yr = int(input("Enter some random year = ")) # Give the width as user input using the int(input()) function and store it in another variable. gvn_widt = int(input("Enter some random width = ")) # Call the Calendar() function and store it in another variable. calendr = calendar.Calendar() # Apply yeardatescalendar() method to the above calendar by passing the given year, # width as the arguments and store it in another variable. rslt = calendr.yeardatescalendar(gvn_yr, gvn_widt) # Iterate in the above result using the for loop. for itr in rslt: # Inside the loop, print the iterator value. print(itr)
Output:
Enter some random year = 2005 Enter some random width = 4 [[[datetime.date(2004, 12, 27), datetime.date(2004, 12, 28), datetime.date(2004, 12, 29), datetime.date(2004, 12, 30), datetime.date(2004, 12, 31), datetime.date(2005, 1, 1), datetime.date(2005, 1, 2)], [datetime.date(2005, 1, 3), datetime.date(2005, 1, 4), datetime.date(2005, 1, 5), datetime.date(2005, 1, 6), datetime.date(2005, 1, 7), datetime.date(2005, 1, 8), datetime.date(2005, 1, 9)], [datetime.date(2005, 1, 10), datetime.date(2005, 1, 11), datetime.date(2005, 1, 12), datetime.date(2005, 1, 13), datetime.date(2005, 1, 14), datetime.date(2005, 1, 15), datetime.date(2005, 1, 16)], [datetime.date(2005, 1, 17), datetime.date(2005, 1, 18), datetime.date(2005, 1, 19), datetime.date(2005, 1, 20), datetime.date(2005, 1, 21), datetime.date(2005, 1, 22), datetime.date(2005, 1, 23)], [datetime.date(2005, 1, 24), datetime.date(2005, 1, 25), datetime.date(2005, 1, 26), datetime.date(2005, 1, 27), datetime.date(2005, 1, 28), datetime.date(2005, 1, 29), datetime.date(2005, 1, 30)], [datetime.date(2005, 1, 31), datetime.date(2005, 2, 1), datetime.date(2005, 2, 2), datetime.date(2005, 2, 3), datetime.date(2005, 2, 4), datetime.date(2005, 2, 5), datetime.date(2005, 2, 6)]], [[datetime.date(2005, 1, 31), datetime.date(2005, 2, 1), datetime.date(2005, 2, 2), datetime.date(2005, 2, 3), datetime.date(2005, 2, 4), datetime.date(2005, 2, 5), datetime.date(2005, 2, 6)], [datetime.date(2005, 2, 7), datetime.date(2005, 2, 8), datetime.date(2005, 2, 9), datetime.date(2005, 2, 10), datetime.date(2005, 2, 11), datetime.date(2005, 2, 12), datetime.date(2005, 2, 13)], [datetime.date(2005, 2, 14), datetime.date(2005, 2, 15), datetime.date(2005, 2, 16), datetime.date(2005, 2, 17), datetime.date(2005, 2, 18), datetime.date(2005, 2, 19), datetime.date(2005, 2, 20)], [datetime.date(2005, 2, 21), datetime.date(2005, 2, 22), datetime.date(2005, 2, 23), datetime.date(2005, 2, 24), datetime.date(2005, 2, 25), datetime.date(2005, 2, 26), datetime.date(2005, 2, 27)], [datetime.date(2005, 2, 28), datetime.date(2005, 3, 1), datetime.date(2005, 3, 2), datetime.date(2005, 3, 3), datetime.date(2005, 3, 4), datetime.date(2005, 3, 5), datetime.date(2005, 3, 6)]], [[datetime.date(2005, 2, 28), datetime.date(2005, 3, 1), datetime.date(2005, 3, 2), datetime.date(2005, 3, 3), datetime.date(2005, 3, 4), datetime.date(2005, 3, 5), datetime.date(2005, 3, 6)], [datetime.date(2005, 3, 7), datetime.date(2005, 3, 8), datetime.date(2005, 3, 9), datetime.date(2005, 3, 10), datetime.date(2005, 3, 11), datetime.date(2005, 3, 12), datetime.date(2005, 3, 13)], [datetime.date(2005, 3, 14), datetime.date(2005, 3, 15), datetime.date(2005, 3, 16), datetime.date(2005, 3, 17), datetime.date(2005, 3, 18), datetime.date(2005, 3, 19), datetime.date(2005, 3, 20)], [datetime.date(2005, 3, 21), datetime.date(2005, 3, 22), datetime.date(2005, 3, 23), datetime.date(2005, 3, 24), datetime.date(2005, 3, 25), datetime.date(2005, 3, 26), datetime.date(2005, 3, 27)], [datetime.date(2005, 3, 28), datetime.date(2005, 3, 29), datetime.date(2005, 3, 30), datetime.date(2005, 3, 31), datetime.date(2005, 4, 1), datetime.date(2005, 4, 2), datetime.date(2005, 4, 3)]], [[datetime.date(2005, 3, 28), datetime.date(2005, 3, 29), datetime.date(2005, 3, 30), datetime.date(2005, 3, 31), datetime.date(2005, 4, 1), datetime.date(2005, 4, 2), datetime.date(2005, 4, 3)], [datetime.date(2005, 4, 4), datetime.date(2005, 4, 5), datetime.date(2005, 4, 6), datetime.date(2005, 4, 7), datetime.date(2005, 4, 8), datetime.date(2005, 4, 9), datetime.date(2005, 4, 10)], [datetime.date(2005, 4, 11), datetime.date(2005, 4, 12), datetime.date(2005, 4, 13), datetime.date(2005, 4, 14), datetime.date(2005, 4, 15), datetime.date(2005, 4, 16), datetime.date(2005, 4, 17)], [datetime.date(2005, 4, 18), datetime.date(2005, 4, 19), datetime.date(2005, 4, 20), datetime.date(2005, 4, 21), datetime.date(2005, 4, 22), datetime.date(2005, 4, 23), datetime.date(2005, 4, 24)], [datetime.date(2005, 4, 25), datetime.date(2005, 4, 26), datetime.date(2005, 4, 27), datetime.date(2005, 4, 28), datetime.date(2005, 4, 29), datetime.date(2005, 4, 30), datetime.date(2005, 5, 1)]]] [[[datetime.date(2005, 4, 25), datetime.date(2005, 4, 26), datetime.date(2005, 4, 27), datetime.date(2005, 4, 28), datetime.date(2005, 4, 29), datetime.date(2005, 4, 30), datetime.date(2005, 5, 1)], [datetime.date(2005, 5, 2), datetime.date(2005, 5, 3), datetime.date(2005, 5, 4), datetime.date(2005, 5, 5), datetime.date(2005, 5, 6), datetime.date(2005, 5, 7), datetime.date(2005, 5, 8)], [datetime.date(2005, 5, 9), datetime.date(2005, 5, 10), datetime.date(2005, 5, 11), datetime.date(2005, 5, 12), datetime.date(2005, 5, 13), datetime.date(2005, 5, 14), datetime.date(2005, 5, 15)], [datetime.date(2005, 5, 16), datetime.date(2005, 5, 17), datetime.date(2005, 5, 18), datetime.date(2005, 5, 19), datetime.date(2005, 5, 20), datetime.date(2005, 5, 21), datetime.date(2005, 5, 22)], [datetime.date(2005, 5, 23), datetime.date(2005, 5, 24), datetime.date(2005, 5, 25), datetime.date(2005, 5, 26), datetime.date(2005, 5, 27), datetime.date(2005, 5, 28), datetime.date(2005, 5, 29)], [datetime.date(2005, 5, 30), datetime.date(2005, 5, 31), datetime.date(2005, 6, 1), datetime.date(2005, 6, 2), datetime.date(2005, 6, 3), datetime.date(2005, 6, 4), datetime.date(2005, 6, 5)]], [[datetime.date(2005, 5, 30), datetime.date(2005, 5, 31), datetime.date(2005, 6, 1), datetime.date(2005, 6, 2), datetime.date(2005, 6, 3), datetime.date(2005, 6, 4), datetime.date(2005, 6, 5)], [datetime.date(2005, 6, 6), datetime.date(2005, 6, 7), datetime.date(2005, 6, 8), datetime.date(2005, 6, 9), datetime.date(2005, 6, 10), datetime.date(2005, 6, 11), datetime.date(2005, 6, 12)], [datetime.date(2005, 6, 13), datetime.date(2005, 6, 14), datetime.date(2005, 6, 15), datetime.date(2005, 6, 16), datetime.date(2005, 6, 17), datetime.date(2005, 6, 18), datetime.date(2005, 6, 19)], [datetime.date(2005, 6, 20), datetime.date(2005, 6, 21), datetime.date(2005, 6, 22), datetime.date(2005, 6, 23), datetime.date(2005, 6, 24), datetime.date(2005, 6, 25), datetime.date(2005, 6, 26)], [datetime.date(2005, 6, 27), datetime.date(2005, 6, 28), datetime.date(2005, 6, 29), datetime.date(2005, 6, 30), datetime.date(2005, 7, 1), datetime.date(2005, 7, 2), datetime.date(2005, 7, 3)]], [[datetime.date(2005, 6, 27), datetime.date(2005, 6, 28), datetime.date(2005, 6, 29), datetime.date(2005, 6, 30), datetime.date(2005, 7, 1), datetime.date(2005, 7, 2), datetime.date(2005, 7, 3)], [datetime.date(2005, 7, 4), datetime.date(2005, 7, 5), datetime.date(2005, 7, 6), datetime.date(2005, 7, 7), datetime.date(2005, 7, 8), datetime.date(2005, 7, 9), datetime.date(2005, 7, 10)], [datetime.date(2005, 7, 11), datetime.date(2005, 7, 12), datetime.date(2005, 7, 13), datetime.date(2005, 7, 14), datetime.date(2005, 7, 15), datetime.date(2005, 7, 16), datetime.date(2005, 7, 17)], [datetime.date(2005, 7, 18), datetime.date(2005, 7, 19), datetime.date(2005, 7, 20), datetime.date(2005, 7, 21), datetime.date(2005, 7, 22), datetime.date(2005, 7, 23), datetime.date(2005, 7, 24)], [datetime.date(2005, 7, 25), datetime.date(2005, 7, 26), datetime.date(2005, 7, 27), datetime.date(2005, 7, 28), datetime.date(2005, 7, 29), datetime.date(2005, 7, 30), datetime.date(2005, 7, 31)]], [[datetime.date(2005, 8, 1), datetime.date(2005, 8, 2), datetime.date(2005, 8, 3), datetime.date(2005, 8, 4), datetime.date(2005, 8, 5), datetime.date(2005, 8, 6), datetime.date(2005, 8, 7)], [datetime.date(2005, 8, 8), datetime.date(2005, 8, 9), datetime.date(2005, 8, 10), datetime.date(2005, 8, 11), datetime.date(2005, 8, 12), datetime.date(2005, 8, 13), datetime.date(2005, 8, 14)], [datetime.date(2005, 8, 15), datetime.date(2005, 8, 16), datetime.date(2005, 8, 17), datetime.date(2005, 8, 18), datetime.date(2005, 8, 19), datetime.date(2005, 8, 20), datetime.date(2005, 8, 21)], [datetime.date(2005, 8, 22), datetime.date(2005, 8, 23), datetime.date(2005, 8, 24), datetime.date(2005, 8, 25), datetime.date(2005, 8, 26), datetime.date(2005, 8, 27), datetime.date(2005, 8, 28)], [datetime.date(2005, 8, 29), datetime.date(2005, 8, 30), datetime.date(2005, 8, 31), datetime.date(2005, 9, 1), datetime.date(2005, 9, 2), datetime.date(2005, 9, 3), datetime.date(2005, 9, 4)]]] [[[datetime.date(2005, 8, 29), datetime.date(2005, 8, 30), datetime.date(2005, 8, 31), datetime.date(2005, 9, 1), datetime.date(2005, 9, 2), datetime.date(2005, 9, 3), datetime.date(2005, 9, 4)], [datetime.date(2005, 9, 5), datetime.date(2005, 9, 6), datetime.date(2005, 9, 7), datetime.date(2005, 9, 8), datetime.date(2005, 9, 9), datetime.date(2005, 9, 10), datetime.date(2005, 9, 11)], [datetime.date(2005, 9, 12), datetime.date(2005, 9, 13), datetime.date(2005, 9, 14), datetime.date(2005, 9, 15), datetime.date(2005, 9, 16), datetime.date(2005, 9, 17), datetime.date(2005, 9, 18)], [datetime.date(2005, 9, 19), datetime.date(2005, 9, 20), datetime.date(2005, 9, 21), datetime.date(2005, 9, 22), datetime.date(2005, 9, 23), datetime.date(2005, 9, 24), datetime.date(2005, 9, 25)], [datetime.date(2005, 9, 26), datetime.date(2005, 9, 27), datetime.date(2005, 9, 28), datetime.date(2005, 9, 29), datetime.date(2005, 9, 30), datetime.date(2005, 10, 1), datetime.date(2005, 10, 2)]], [[datetime.date(2005, 9, 26), datetime.date(2005, 9, 27), datetime.date(2005, 9, 28), datetime.date(2005, 9, 29), datetime.date(2005, 9, 30), datetime.date(2005, 10, 1), datetime.date(2005, 10, 2)], [datetime.date(2005, 10, 3), datetime.date(2005, 10, 4), datetime.date(2005, 10, 5), datetime.date(2005, 10, 6), datetime.date(2005, 10, 7), datetime.date(2005, 10, 8), datetime.date(2005, 10, 9)], [datetime.date(2005, 10, 10), datetime.date(2005, 10, 11), datetime.date(2005, 10, 12), datetime.date(2005, 10, 13), datetime.date(2005, 10, 14), datetime.date(2005, 10, 15), datetime.date(2005, 10, 16)], [datetime.date(2005, 10, 17), datetime.date(2005, 10, 18), datetime.date(2005, 10, 19), datetime.date(2005, 10, 20), datetime.date(2005, 10, 21), datetime.date(2005, 10, 22), datetime.date(2005, 10, 23)], [datetime.date(2005, 10, 24), datetime.date(2005, 10, 25), datetime.date(2005, 10, 26), datetime.date(2005, 10, 27), datetime.date(2005, 10, 28), datetime.date(2005, 10, 29), datetime.date(2005, 10, 30)], [datetime.date(2005, 10, 31), datetime.date(2005, 11, 1), datetime.date(2005, 11, 2), datetime.date(2005, 11, 3), datetime.date(2005, 11, 4), datetime.date(2005, 11, 5), datetime.date(2005, 11, 6)]], [[datetime.date(2005, 10, 31), datetime.date(2005, 11, 1), datetime.date(2005, 11, 2), datetime.date(2005, 11, 3), datetime.date(2005, 11, 4), datetime.date(2005, 11, 5), datetime.date(2005, 11, 6)], [datetime.date(2005, 11, 7), datetime.date(2005, 11, 8), datetime.date(2005, 11, 9), datetime.date(2005, 11, 10), datetime.date(2005, 11, 11), datetime.date(2005, 11, 12), datetime.date(2005, 11, 13)], [datetime.date(2005, 11, 14), datetime.date(2005, 11, 15), datetime.date(2005, 11, 16), datetime.date(2005, 11, 17), datetime.date(2005, 11, 18), datetime.date(2005, 11, 19), datetime.date(2005, 11, 20)], [datetime.date(2005, 11, 21), datetime.date(2005, 11, 22), datetime.date(2005, 11, 23), datetime.date(2005, 11, 24), datetime.date(2005, 11, 25), datetime.date(2005, 11, 26), datetime.date(2005, 11, 27)], [datetime.date(2005, 11, 28), datetime.date(2005, 11, 29), datetime.date(2005, 11, 30), datetime.date(2005, 12, 1), datetime.date(2005, 12, 2), datetime.date(2005, 12, 3), datetime.date(2005, 12, 4)]], [[datetime.date(2005, 11, 28), datetime.date(2005, 11, 29), datetime.date(2005, 11, 30), datetime.date(2005, 12, 1), datetime.date(2005, 12, 2), datetime.date(2005, 12, 3), datetime.date(2005, 12, 4)], [datetime.date(2005, 12, 5), datetime.date(2005, 12, 6), datetime.date(2005, 12, 7), datetime.date(2005, 12, 8), datetime.date(2005, 12, 9), datetime.date(2005, 12, 10), datetime.date(2005, 12, 11)], [datetime.date(2005, 12, 12), datetime.date(2005, 12, 13), datetime.date(2005, 12, 14), datetime.date(2005, 12, 15), datetime.date(2005, 12, 16), datetime.date(2005, 12, 17), datetime.date(2005, 12, 18)], [datetime.date(2005, 12, 19), datetime.date(2005, 12, 20), datetime.date(2005, 12, 21), datetime.date(2005, 12, 22), datetime.date(2005, 12, 23), datetime.date(2005, 12, 24), datetime.date(2005, 12, 25)], [datetime.date(2005, 12, 26), datetime.date(2005, 12, 27), datetime.date(2005, 12, 28), datetime.date(2005, 12, 29), datetime.date(2005, 12, 30), datetime.date(2005, 12, 31), datetime.date(2006, 1, 1)]]]