On this page
  1. calendar.IllegalMonthError
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

calendar.IllegalMonthError

Prev: calendar.HTMLCalendar | Up: calendar | Next: calendar.IllegalWeekdayError
Rel: calendar.calendar, calendar.Calendar, calendar.Day, calendar.firstweekday
Ref: docs.python.org โ€” calendar.IllegalMonthError
Tags: #public #python3 #stdlib #calendar


Import

import calendar
from calendar import IllegalMonthError

Signature & Overview

calendar.IllegalMonthError(month)

calendar.IllegalMonthError class.

Methods & Attributes

Usage

import calendar

try:
    calendar.monthrange(2026, 13)
except calendar.IllegalMonthError:
    assert True

Gotchas

REPL Inspect

from calendar import IllegalMonthError
help(IllegalMonthError)

Linked from

Related notes