0% found this document useful (0 votes)
2 views2 pages

Calendar Module Notes

The Calendar Module provides functions to display calendars, check for leap years, and manage weekdays. Key functions include calendar(), month(), isleap(), and weekday(). An example program demonstrates how to use these functions to display specific calendars and check leap years.

Uploaded by

Amirish Kanna
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Calendar Module Notes

The Calendar Module provides functions to display calendars, check for leap years, and manage weekdays. Key functions include calendar(), month(), isleap(), and weekday(). An example program demonstrates how to use these functions to display specific calendars and check leap years.

Uploaded by

Amirish Kanna
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CALENDAR MODULE NOTES

Meaning: Calendar Module is used to show month, year calendar, weekdays, and leap year
details.

Functions List

Function Meaning

calendar() Full year calendar

month() One month calendar

calendar() full year Show complete year

isleap() Check leap year

leapdays(y1,y2) Count leap years

firstweekday() Show first weekday

setfirstweekday() Set first weekday

weekday() Show day name number

One Easy Program

import calendar

print([Link](2026,4)) # April month calendar

print([Link](2026)) # Full year calendar

print([Link](2024)) # Check leap year

print([Link](2020,2030)) # Leap years count

print([Link]()) # Current first weekday

[Link](6) # Set Sunday first

print([Link]()) # New first weekday

print([Link](2026,4,16)) # Day number


Output (Example)

April 2026
Mo Tu We Th Fr Sa Su
1 2 3 4 5
6 7 8 9 10 11 12
...

(Full Year Calendar)

True

You might also like