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

calendar.LocaleTextCalendar

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


Import

import calendar
from calendar import LocaleTextCalendar

Signature & Overview

calendar.LocaleTextCalendar(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

txt = calendar.LocaleTextCalendar().formatmonth(2026, 12)
assert "2026" in txt

Gotchas

REPL Inspect

from calendar import LocaleTextCalendar
help(LocaleTextCalendar)

Linked from

Related notes