summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorHugo van Kemenade <1324225+hugovk@users.noreply.github.com>2024-12-30 17:25:39 (GMT)
committerGitHub <noreply@github.com>2024-12-30 17:25:39 (GMT)
commit6dbace397fab5154f66226abb11af32d2d13219f (patch)
treefe3c2d864472e893ade70d5f13e1601b5c9f5eef /Doc/library
parent34b85ef26c44bbbd8a05d3e7dee6997b3623aab0 (diff)
downloadcpython-6dbace397fab5154f66226abb11af32d2d13219f.zip
cpython-6dbace397fab5154f66226abb11af32d2d13219f.tar.gz
cpython-6dbace397fab5154f66226abb11af32d2d13219f.tar.bz2
gh-128317: Document `calendar.TextCalendar.formatweek` (#128353)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/calendar.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/calendar.rst b/Doc/library/calendar.rst
index eafc038..9a4395e 100644
--- a/Doc/library/calendar.rst
+++ b/Doc/library/calendar.rst
@@ -138,6 +138,14 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
:class:`TextCalendar` instances have the following methods:
+ .. 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:: formatmonth(theyear, themonth, w=0, l=0)
Return a month's calendar in a multi-line string. If *w* is provided, it