]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-128317: Document `calendar.TextCalendar.formatweek` (GH-128353) (#128358)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 30 Dec 2024 17:40:31 +0000 (18:40 +0100)
committerGitHub <noreply@github.com>
Mon, 30 Dec 2024 17:40:31 +0000 (19:40 +0200)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Doc/library/calendar.rst

index 102bc2871799c578fbac145fe7dff3b31c7ea9fb..4b82e52bf3d8ba9a2111ccfaefd60e11cf7a86ee 100644 (file)
@@ -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