Python Calendar Module

0

Python Calendar Module 

  • Calendar module in Python has the calendar class that allows the calculations for various task based on date, month, and year.
  • Python has an built-in module named Calendar that contains useful classes and functions to support a variety of calendar operations. By default, the Calendar module follows the Gregorian calendar, where Monday is the first day (0) of the week and Sunday is the last day of the week (6).

Source Code:

  • Example #1: Display Calendar of given month? 
import calender
yy = 2020
mm = 8
print(calendar.month(yy, mm))


Example #2: Display calendar of given year?

Source Code:

import calender
print("The calender of year 2020 is : ")
print(calender.calender(2020, 2, 1, 6))



 

Post a Comment

0Comments
Post a Comment (0)