calendar
Stdlib — Date/TimePython 2.0+Beginner
Calendar functions: month/year calendars, weekday, leap years
Quick Info
- Documentation
- Official Docs
- Python Version
- 2.0+
- Dependencies
- None — Python Standard Library
- Install
Included with Python
Learn by Difficulty
Quick Example
python
import calendar print(calendar.month(2024, 1)) print(f"Is 2024 a leap year? {calendar.isleap(2024)}")
The calendar module is part of Python's standard library. Calendar functions: month/year calendars, weekday, leap years.
Try in PlaygroundTags
stdlibdatetimetime