Python defines an inbuilt module calendar that handles operations related to the calendar.
The calendar module allows output calendars like the program and provides additional useful functions related to the calendar. Functions and classes defined in the Calendar module use an idealized calendar, the current Gregorian calendar extended indefinitely in both directions. By default, these calendars have Monday as the first day of the week, and Sunday as the last (the European convention).
weekday() Function returns the week day number(0 is Monday) of the date specified in its arguments
weekheader() Returns a header containing abbreviated weekday names
monthrange() Function returns two integers, first, the starting day number of week(0 as monday), second, the number of days in the month
monthcalendar() Returns a matrix representing a month’s calendar. Each row represents a week; days outside of the month are represented by zeros
prmonth() Function also prints the month of specific year but there is no need of “print” operation to execute this
month() Function prints the month of a specific year mentioned in arguments
prcal() Function also prints the calendar of specific year but there is no need of “print” operation to execute this
calendar() Function displays the year, width of characters, no. of lines per week and column separations.
#CodeWithCougar
Please Subscribe to Code With Cougar:
/ @code-with-cougar