Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into fix-issue-108202
  • Loading branch information
hugovk authored Nov 24, 2025
commit af75ed25603202fa40d82f0b04db9c9621d347f4
30 changes: 30 additions & 0 deletions Doc/library/calendar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,36 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
Print a week's calendar as returned by :meth:`formatweek` and sets the
Comment thread
hugovk marked this conversation as resolved.
Outdated
end parameter to an empty string to prevent adding a newline character.


.. method:: formatday(theday, weekday, width)

Return a string representing a single day formatted with the given *width*.
If *theday* is ``0``, return a string of spaces of
the specified width, representing an empty day. The *weekday* parameter
is unused.

.. method:: formatweek(theweek, w=0)

Return a single week in a string with no newline. If *w* is provided, it
specifies the width of the date columns, which are centered. Depends
on the first weekday as specified in the constructor or set by the
:meth:`setfirstweekday` method.


.. method:: formatweekday(weekday, width)

Return a string representing the name of a single weekday formatted to
the specified *width*. The *weekday* parameter is an integer representing
the day of the week, where ``0`` is Monday and ``6`` is Sunday.


.. method:: formatweekheader(width)

Return a string containing the header row of weekday names, formatted
with the given *width* for each column. The names depend on the locale
settings and are padded to the specified width.


.. method:: formatmonth(theyear, themonth, w=0, l=0)

Return a month's calendar in a multi-line string. If *w* is provided, it
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.