]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-101100: Fix Sphinx warnings in `library/calendar.rst` (GH-113500) (#113508)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 27 Dec 2023 09:42:57 +0000 (10:42 +0100)
committerGitHub <noreply@github.com>
Wed, 27 Dec 2023 09:42:57 +0000 (09:42 +0000)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Doc/library/calendar.rst
Doc/tools/.nitignore

index dbef171c487dba2ef30bb650f2dee93e301877bd..d874cd24c4b9f57bf35300bac6185d7f07d179a2 100644 (file)
@@ -196,6 +196,13 @@ interpreted as prescribed by the ISO 8601 standard.  Year 0 is 1 BC, year -1 is
       output (defaulting to the system default encoding).
 
 
+   .. method:: formatmonthname(theyear, themonth, withyear=True)
+
+      Return a month name as an HTML table row. If *withyear* is true the year
+      will be included in the row, otherwise just the month name will be
+      used.
+
+
    :class:`!HTMLCalendar` has the following attributes you can override to
    customize the CSS classes used by the calendar:
 
@@ -289,7 +296,7 @@ interpreted as prescribed by the ISO 8601 standard.  Year 0 is 1 BC, year -1 is
 
 .. note::
 
-   The constructor, :meth:`formatweekday` and :meth:`formatmonthname` methods
+   The constructor, :meth:`!formatweekday` and :meth:`!formatmonthname` methods
    of these two classes temporarily change the ``LC_TIME`` locale to the given
    *locale*. Because the current locale is a process-wide setting, they are
    not thread-safe.
@@ -358,7 +365,7 @@ For simple text calendars this module provides the following functions.
 
 .. function:: month(theyear, themonth, w=0, l=0)
 
-   Returns a month's calendar in a multi-line string using the :meth:`formatmonth`
+   Returns a month's calendar in a multi-line string using the :meth:`~TextCalendar.formatmonth`
    of the :class:`TextCalendar` class.
 
 
@@ -370,7 +377,7 @@ For simple text calendars this module provides the following functions.
 .. function:: calendar(year, w=2, l=1, c=6, m=3)
 
    Returns a 3-column calendar for an entire year as a multi-line string using
-   the :meth:`formatyear` of the :class:`TextCalendar` class.
+   the :meth:`~TextCalendar.formatyear` of the :class:`TextCalendar` class.
 
 
 .. function:: timegm(tuple)
index 98d915fb1d6cf73bd130b5c77d6dec56f6420508..03b3613d95c6e7330dcbe8643f9db2087d4fb50a 100644 (file)
@@ -31,7 +31,6 @@ Doc/library/asyncio-policy.rst
 Doc/library/asyncio-subprocess.rst
 Doc/library/asyncio-task.rst
 Doc/library/bdb.rst
-Doc/library/calendar.rst
 Doc/library/cmd.rst
 Doc/library/collections.rst
 Doc/library/concurrent.futures.rst