On this page
calendar.month
Prev: calendar.LocaleTextCalendar | Up: calendar | Next: calendar.Month
Rel: calendar.calendar, calendar.Calendar, calendar.Day, calendar.firstweekday
Ref: docs.python.org — calendar.month
Tags: #public #python3 #stdlib #calendar
Import
import calendar
from calendar import month
Signature & Overview
calendar.month(theyear, themonth, w=0, l=0)
Return a month's calendar string (multi-line).
Usage
import calendar
s = calendar.month(2026, 12)
assert "December 2026" in s
Gotchas
- Returns a formatted plain-text month string (use
prmonth()to print directly).
REPL Inspect
from calendar import month
help(month)
Linked from
Related notes
- tuts/python3/stdlib_module/calendar/LocaleTextCalendar Linked here; links to this page; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/Month_class Linked here; links to this page; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/calendar Linked here; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/Calendar_class Linked here; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/Day Linked here; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/firstweekday Linked here; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/calendar/HTMLCalendar shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/IllegalMonthError shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/IllegalWeekdayError shared tags: #calendar, #stdlib