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

calendar.LocaleHTMLCalendar

Prev: calendar.leapdays | Up: calendar | Next: calendar.LocaleTextCalendar
Rel: calendar.calendar, calendar.Calendar, calendar.Day, calendar.firstweekday
Ref: docs.python.org — calendar.LocaleHTMLCalendar
Tags: #public #python3 #stdlib #calendar


Import

import calendar
from calendar import LocaleHTMLCalendar

Signature & Overview

calendar.LocaleHTMLCalendar(firstweekday=0, locale=None)

This class can be passed a locale name in the constructor and will return month and weekday names in the specified locale.

Methods & Attributes

Usage

import calendar

html = calendar.LocaleHTMLCalendar().formatmonth(2026, 12)
assert "<table" in html

Gotchas

REPL Inspect

from calendar import LocaleHTMLCalendar
help(LocaleHTMLCalendar)

Linked from

Related notes