Python Program for calendar yeardatescalendar() Method with Examples

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.

yeardatescalendar() Method:

The yeardatescalendar() method returns data for the given year that is ready for formatting.
A list of month rows is returned as the return value. Each month row contains a width of up to width months.
Each month has between 4 and 6 weeks, and each week has between 1 and 7 days. Dates are represented as datetime. date objects.

Syntax:

yeardatescalendar(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 month rows.

Program for calendar yeardatescalendar() 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 = 6
# 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 = 2014
Enter some random width = 8
[[[datetime.date(2013, 12, 30), datetime.date(2013, 12, 31), datetime.date(2014, 1, 1), datetime.date(2014, 1, 2), datetime.date(2014, 1, 3), datetime.date(2014, 1, 4), datetime.date(2014, 1, 5)], [datetime.date(2014, 1, 6), datetime.date(2014, 1, 7), datetime.date(2014, 1, 8), datetime.date(2014, 1, 9), datetime.date(2014, 1, 10), datetime.date(2014, 1, 11), datetime.date(2014, 1, 12)], [datetime.date(2014, 1, 13), datetime.date(2014, 1, 14), datetime.date(2014, 1, 15), datetime.date(2014, 1, 16), datetime.date(2014, 1, 17), datetime.date(2014, 1, 18), datetime.date(2014, 1, 19)], [datetime.date(2014, 1, 20), datetime.date(2014, 1, 21), datetime.date(2014, 1, 22), datetime.date(2014, 1, 23), datetime.date(2014, 1, 24), datetime.date(2014, 1, 25), datetime.date(2014, 1, 26)], [datetime.date(2014, 1, 27), datetime.date(2014, 1, 28), datetime.date(2014, 1, 29), datetime.date(2014, 1, 30), datetime.date(2014, 1, 31), datetime.date(2014, 2, 1), datetime.date(2014, 2, 2)]], [[datetime.date(2014, 1, 27), datetime.date(2014, 1, 28), datetime.date(2014, 1, 29), datetime.date(2014, 1, 30), datetime.date(2014, 1, 31), datetime.date(2014, 2, 1), datetime.date(2014, 2, 2)], [datetime.date(2014, 2, 3), datetime.date(2014, 2, 4), datetime.date(2014, 2, 5), datetime.date(2014, 2, 6), datetime.date(2014, 2, 7), datetime.date(2014, 2, 8), datetime.date(2014, 2, 9)], [datetime.date(2014, 2, 10), datetime.date(2014, 2, 11), datetime.date(2014, 2, 12), datetime.date(2014, 2, 13), datetime.date(2014, 2, 14), datetime.date(2014, 2, 15), datetime.date(2014, 2, 16)], [datetime.date(2014, 2, 17), datetime.date(2014, 2, 18), datetime.date(2014, 2, 19), datetime.date(2014, 2, 20), datetime.date(2014, 2, 21), datetime.date(2014, 2, 22), datetime.date(2014, 2, 23)], [datetime.date(2014, 2, 24), datetime.date(2014, 2, 25), datetime.date(2014, 2, 26), datetime.date(2014, 2, 27), datetime.date(2014, 2, 28), datetime.date(2014, 3, 1), datetime.date(2014, 3, 2)]], [[datetime.date(2014, 2, 24), datetime.date(2014, 2, 25), datetime.date(2014, 2, 26), datetime.date(2014, 2, 27), datetime.date(2014, 2, 28), datetime.date(2014, 3, 1), datetime.date(2014, 3, 2)], [datetime.date(2014, 3, 3), datetime.date(2014, 3, 4), datetime.date(2014, 3, 5), datetime.date(2014, 3, 6), datetime.date(2014, 3, 7), datetime.date(2014, 3, 8), datetime.date(2014, 3, 9)], [datetime.date(2014, 3, 10), datetime.date(2014, 3, 11), datetime.date(2014, 3, 12), datetime.date(2014, 3, 13), datetime.date(2014, 3, 14), datetime.date(2014, 3, 15), datetime.date(2014, 3, 16)], [datetime.date(2014, 3, 17), datetime.date(2014, 3, 18), datetime.date(2014, 3, 19), datetime.date(2014, 3, 20), datetime.date(2014, 3, 21), datetime.date(2014, 3, 22), datetime.date(2014, 3, 23)], [datetime.date(2014, 3, 24), datetime.date(2014, 3, 25), datetime.date(2014, 3, 26), datetime.date(2014, 3, 27), datetime.date(2014, 3, 28), datetime.date(2014, 3, 29), datetime.date(2014, 3, 30)], [datetime.date(2014, 3, 31), datetime.date(2014, 4, 1), datetime.date(2014, 4, 2), datetime.date(2014, 4, 3), datetime.date(2014, 4, 4), datetime.date(2014, 4, 5), datetime.date(2014, 4, 6)]], [[datetime.date(2014, 3, 31), datetime.date(2014, 4, 1), datetime.date(2014, 4, 2), datetime.date(2014, 4, 3), datetime.date(2014, 4, 4), datetime.date(2014, 4, 5), datetime.date(2014, 4, 6)], [datetime.date(2014, 4, 7), datetime.date(2014, 4, 8), datetime.date(2014, 4, 9), datetime.date(2014, 4, 10), datetime.date(2014, 4, 11), datetime.date(2014, 4, 12), datetime.date(2014, 4, 13)], [datetime.date(2014, 4, 14), datetime.date(2014, 4, 15), datetime.date(2014, 4, 16), datetime.date(2014, 4, 17), datetime.date(2014, 4, 18), datetime.date(2014, 4, 19), datetime.date(2014, 4, 20)], [datetime.date(2014, 4, 21), datetime.date(2014, 4, 22), datetime.date(2014, 4, 23), datetime.date(2014, 4, 24), datetime.date(2014, 4, 25), datetime.date(2014, 4, 26), datetime.date(2014, 4, 27)], [datetime.date(2014, 4, 28), datetime.date(2014, 4, 29), datetime.date(2014, 4, 30), datetime.date(2014, 5, 1), datetime.date(2014, 5, 2), datetime.date(2014, 5, 3), datetime.date(2014, 5, 4)]], [[datetime.date(2014, 4, 28), datetime.date(2014, 4, 29), datetime.date(2014, 4, 30), datetime.date(2014, 5, 1), datetime.date(2014, 5, 2), datetime.date(2014, 5, 3), datetime.date(2014, 5, 4)], [datetime.date(2014, 5, 5), datetime.date(2014, 5, 6), datetime.date(2014, 5, 7), datetime.date(2014, 5, 8), datetime.date(2014, 5, 9), datetime.date(2014, 5, 10), datetime.date(2014, 5, 11)], [datetime.date(2014, 5, 12), datetime.date(2014, 5, 13), datetime.date(2014, 5, 14), datetime.date(2014, 5, 15), datetime.date(2014, 5, 16), datetime.date(2014, 5, 17), datetime.date(2014, 5, 18)], [datetime.date(2014, 5, 19), datetime.date(2014, 5, 20), datetime.date(2014, 5, 21), datetime.date(2014, 5, 22), datetime.date(2014, 5, 23), datetime.date(2014, 5, 24), datetime.date(2014, 5, 25)], [datetime.date(2014, 5, 26), datetime.date(2014, 5, 27), datetime.date(2014, 5, 28), datetime.date(2014, 5, 29), datetime.date(2014, 5, 30), datetime.date(2014, 5, 31), datetime.date(2014, 6, 1)]], [[datetime.date(2014, 5, 26), datetime.date(2014, 5, 27), datetime.date(2014, 5, 28), datetime.date(2014, 5, 29), datetime.date(2014, 5, 30), datetime.date(2014, 5, 31), datetime.date(2014, 6, 1)], [datetime.date(2014, 6, 2), datetime.date(2014, 6, 3), datetime.date(2014, 6, 4), datetime.date(2014, 6, 5), datetime.date(2014, 6, 6), datetime.date(2014, 6, 7), datetime.date(2014, 6, 8)], [datetime.date(2014, 6, 9), datetime.date(2014, 6, 10), datetime.date(2014, 6, 11), datetime.date(2014, 6, 12), datetime.date(2014, 6, 13), datetime.date(2014, 6, 14), datetime.date(2014, 6, 15)], [datetime.date(2014, 6, 16), datetime.date(2014, 6, 17), datetime.date(2014, 6, 18), datetime.date(2014, 6, 19), datetime.date(2014, 6, 20), datetime.date(2014, 6, 21), datetime.date(2014, 6, 22)], [datetime.date(2014, 6, 23), datetime.date(2014, 6, 24), datetime.date(2014, 6, 25), datetime.date(2014, 6, 26), datetime.date(2014, 6, 27), datetime.date(2014, 6, 28), datetime.date(2014, 6, 29)], [datetime.date(2014, 6, 30), datetime.date(2014, 7, 1), datetime.date(2014, 7, 2), datetime.date(2014, 7, 3), datetime.date(2014, 7, 4), datetime.date(2014, 7, 5), datetime.date(2014, 7, 6)]], [[datetime.date(2014, 6, 30), datetime.date(2014, 7, 1), datetime.date(2014, 7, 2), datetime.date(2014, 7, 3), datetime.date(2014, 7, 4), datetime.date(2014, 7, 5), datetime.date(2014, 7, 6)], [datetime.date(2014, 7, 7), datetime.date(2014, 7, 8), datetime.date(2014, 7, 9), datetime.date(2014, 7, 10), datetime.date(2014, 7, 11), datetime.date(2014, 7, 12), datetime.date(2014, 7, 13)], [datetime.date(2014, 7, 14), datetime.date(2014, 7, 15), datetime.date(2014, 7, 16), datetime.date(2014, 7, 17), datetime.date(2014, 7, 18), datetime.date(2014, 7, 19), datetime.date(2014, 7, 20)], [datetime.date(2014, 7, 21), datetime.date(2014, 7, 22), datetime.date(2014, 7, 23), datetime.date(2014, 7, 24), datetime.date(2014, 7, 25), datetime.date(2014, 7, 26), datetime.date(2014, 7, 27)], [datetime.date(2014, 7, 28), datetime.date(2014, 7, 29), datetime.date(2014, 7, 30), datetime.date(2014, 7, 31), datetime.date(2014, 8, 1), datetime.date(2014, 8, 2), datetime.date(2014, 8, 3)]], [[datetime.date(2014, 7, 28), datetime.date(2014, 7, 29), datetime.date(2014, 7, 30), datetime.date(2014, 7, 31), datetime.date(2014, 8, 1), datetime.date(2014, 8, 2), datetime.date(2014, 8, 3)], [datetime.date(2014, 8, 4), datetime.date(2014, 8, 5), datetime.date(2014, 8, 6), datetime.date(2014, 8, 7), datetime.date(2014, 8, 8), datetime.date(2014, 8, 9), datetime.date(2014, 8, 10)], [datetime.date(2014, 8, 11), datetime.date(2014, 8, 12), datetime.date(2014, 8, 13), datetime.date(2014, 8, 14), datetime.date(2014, 8, 15), datetime.date(2014, 8, 16), datetime.date(2014, 8, 17)], [datetime.date(2014, 8, 18), datetime.date(2014, 8, 19), datetime.date(2014, 8, 20), datetime.date(2014, 8, 21), datetime.date(2014, 8, 22), datetime.date(2014, 8, 23), datetime.date(2014, 8, 24)], [datetime.date(2014, 8, 25), datetime.date(2014, 8, 26), datetime.date(2014, 8, 27), datetime.date(2014, 8, 28), datetime.date(2014, 8, 29), datetime.date(2014, 8, 30), datetime.date(2014, 8, 31)]]]
[[[datetime.date(2014, 9, 1), datetime.date(2014, 9, 2), datetime.date(2014, 9, 3), datetime.date(2014, 9, 4), datetime.date(2014, 9, 5), datetime.date(2014, 9, 6), datetime.date(2014, 9, 7)], [datetime.date(2014, 9, 8), datetime.date(2014, 9, 9), datetime.date(2014, 9, 10), datetime.date(2014, 9, 11), datetime.date(2014, 9, 12), datetime.date(2014, 9, 13), datetime.date(2014, 9, 14)], [datetime.date(2014, 9, 15), datetime.date(2014, 9, 16), datetime.date(2014, 9, 17), datetime.date(2014, 9, 18), datetime.date(2014, 9, 19), datetime.date(2014, 9, 20), datetime.date(2014, 9, 21)], [datetime.date(2014, 9, 22), datetime.date(2014, 9, 23), datetime.date(2014, 9, 24), datetime.date(2014, 9, 25), datetime.date(2014, 9, 26), datetime.date(2014, 9, 27), datetime.date(2014, 9, 28)], [datetime.date(2014, 9, 29), datetime.date(2014, 9, 30), datetime.date(2014, 10, 1), datetime.date(2014, 10, 2), datetime.date(2014, 10, 3), datetime.date(2014, 10, 4), datetime.date(2014, 10, 5)]], [[datetime.date(2014, 9, 29), datetime.date(2014, 9, 30), datetime.date(2014, 10, 1), datetime.date(2014, 10, 2), datetime.date(2014, 10, 3), datetime.date(2014, 10, 4), datetime.date(2014, 10, 5)], [datetime.date(2014, 10, 6), datetime.date(2014, 10, 7), datetime.date(2014, 10, 8), datetime.date(2014, 10, 9), datetime.date(2014, 10, 10), datetime.date(2014, 10, 11), datetime.date(2014, 10, 12)], [datetime.date(2014, 10, 13), datetime.date(2014, 10, 14), datetime.date(2014, 10, 15), datetime.date(2014, 10, 16), datetime.date(2014, 10, 17), datetime.date(2014, 10, 18), datetime.date(2014, 10, 19)], [datetime.date(2014, 10, 20), datetime.date(2014, 10, 21), datetime.date(2014, 10, 22), datetime.date(2014, 10, 23), datetime.date(2014, 10, 24), datetime.date(2014, 10, 25), datetime.date(2014, 10, 26)], [datetime.date(2014, 10, 27), datetime.date(2014, 10, 28), datetime.date(2014, 10, 29), datetime.date(2014, 10, 30), datetime.date(2014, 10, 31), datetime.date(2014, 11, 1), datetime.date(2014, 11, 2)]], [[datetime.date(2014, 10, 27), datetime.date(2014, 10, 28), datetime.date(2014, 10, 29), datetime.date(2014, 10, 30), datetime.date(2014, 10, 31), datetime.date(2014, 11, 1), datetime.date(2014, 11, 2)], [datetime.date(2014, 11, 3), datetime.date(2014, 11, 4), datetime.date(2014, 11, 5), datetime.date(2014, 11, 6), datetime.date(2014, 11, 7), datetime.date(2014, 11, 8), datetime.date(2014, 11, 9)], [datetime.date(2014, 11, 10), datetime.date(2014, 11, 11), datetime.date(2014, 11, 12), datetime.date(2014, 11, 13), datetime.date(2014, 11, 14), datetime.date(2014, 11, 15), datetime.date(2014, 11, 16)], [datetime.date(2014, 11, 17), datetime.date(2014, 11, 18), datetime.date(2014, 11, 19), datetime.date(2014, 11, 20), datetime.date(2014, 11, 21), datetime.date(2014, 11, 22), datetime.date(2014, 11, 23)], [datetime.date(2014, 11, 24), datetime.date(2014, 11, 25), datetime.date(2014, 11, 26), datetime.date(2014, 11, 27), datetime.date(2014, 11, 28), datetime.date(2014, 11, 29), datetime.date(2014, 11, 30)]], [[datetime.date(2014, 12, 1), datetime.date(2014, 12, 2), datetime.date(2014, 12, 3), datetime.date(2014, 12, 4), datetime.date(2014, 12, 5), datetime.date(2014, 12, 6), datetime.date(2014, 12, 7)], [datetime.date(2014, 12, 8), datetime.date(2014, 12, 9), datetime.date(2014, 12, 10), datetime.date(2014, 12, 11), datetime.date(2014, 12, 12), datetime.date(2014, 12, 13), datetime.date(2014, 12, 14)], [datetime.date(2014, 12, 15), datetime.date(2014, 12, 16), datetime.date(2014, 12, 17), datetime.date(2014, 12, 18), datetime.date(2014, 12, 19), datetime.date(2014, 12, 20), datetime.date(2014, 12, 21)], [datetime.date(2014, 12, 22), datetime.date(2014, 12, 23), datetime.date(2014, 12, 24), datetime.date(2014, 12, 25), datetime.date(2014, 12, 26), datetime.date(2014, 12, 27), datetime.date(2014, 12, 28)], [datetime.date(2014, 12, 29), datetime.date(2014, 12, 30), datetime.date(2014, 12, 31), datetime.date(2015, 1, 1), datetime.date(2015, 1, 2), datetime.date(2015, 1, 3), datetime.date(2015, 1, 4)]]]