@@ -138,21 +138,69 @@ interpreted as prescribed by the ISO 8601 standard.  Year 0 is 1 BC, year -1 is
138138
139139   :class: `TextCalendar ` instances have the following methods:
140140
141-    .. method :: formatmonth(theyear, themonth, w=0, l=0) 
141+ 
142+    .. method :: formatday(theday, weekday, width) 
143+ 
144+       Return a string representing a single day formatted with the given *width *.
145+       If *theday * is ``0 ``, return a string of spaces of
146+       the specified width, representing an empty day. The *weekday * parameter
147+       is unused.
148+ 
149+    .. method :: formatweek(theweek, w=0, highlight_day=None) 
150+ 
151+       Return a single week in a string with no newline. If *w * is provided, it
152+       specifies the width of the date columns, which are centered. Depends
153+       on the first weekday as specified in the constructor or set by the
154+       :meth: `setfirstweekday ` method.
155+ 
156+       .. versionchanged :: next 
157+          If *highlight_day * is given, this date is highlighted in color.
158+          This can be :ref: `controlled using environment variables 
159+          <using-on-controlling-color>`.
160+ 
161+ 
162+    .. method :: formatweekday(weekday, width) 
163+ 
164+       Return a string representing the name of a single weekday formatted to
165+       the specified *width *. The *weekday * parameter is an integer representing
166+       the day of the week, where ``0 `` is Monday and ``6 `` is Sunday.
167+ 
168+ 
169+    .. method :: formatweekheader(width) 
170+ 
171+       Return a string containing the header row of weekday names, formatted
172+       with the given *width * for each column. The names depend on the locale
173+       settings and are padded to the specified width.
174+ 
175+ 
176+    .. method :: formatmonth(theyear, themonth, w=0, l=0, highlight_day=None) 
142177
143178      Return a month's calendar in a multi-line string. If *w * is provided, it
144179      specifies the width of the date columns, which are centered. If *l * is
145180      given, it specifies the number of lines that each week will use. Depends
146181      on the first weekday as specified in the constructor or set by the
147182      :meth: `setfirstweekday ` method.
148183
184+       .. versionchanged :: next 
185+          If *highlight_day * is given, this date is highlighted in color.
186+          This can be :ref: `controlled using environment variables 
187+          <using-on-controlling-color>`.
188+ 
189+ 
190+    .. method :: formatmonthname(theyear, themonth, width=0, withyear=True) 
191+ 
192+       Return a string representing the month's name centered within the
193+       specified *width *. If *withyear * is ``True ``, include the year in the
194+       output. The *theyear * and *themonth * parameters specify the year
195+       and month for the name to be formatted respectively.
196+ 
149197
150198   .. method :: prmonth(theyear, themonth, w=0, l=0) 
151199
152200      Print a month's calendar as returned by :meth: `formatmonth `.
153201
154202
155-    .. method :: formatyear(theyear, w=2, l=1, c=6, m=3) 
203+    .. method :: formatyear(theyear, w=2, l=1, c=6, m=3, highlight_day=None ) 
156204
157205      Return a *m *-column calendar for an entire year as a multi-line string.
158206      Optional parameters *w *, *l *, and *c * are for date column width, lines per
@@ -161,6 +209,11 @@ interpreted as prescribed by the ISO 8601 standard.  Year 0 is 1 BC, year -1 is
161209      :meth: `setfirstweekday ` method.  The earliest year for which a calendar
162210      can be generated is platform-dependent.
163211
212+       .. versionchanged :: next 
213+          If *highlight_day * is given, this date is highlighted in color.
214+          This can be :ref: `controlled using environment variables 
215+          <using-on-controlling-color>`.
216+ 
164217
165218   .. method :: pryear(theyear, w=2, l=1, c=6, m=3) 
166219
@@ -437,7 +490,7 @@ The :mod:`calendar` module exports the following data attributes:
437490
438491   A sequence that represents the months of the year in the current locale.  This
439492   follows normal convention of January being month number 1, so it has a length of
440-    13 and   ``month_name[0] `` is the empty string.
493+    13 and ``month_name[0] `` is the empty string.
441494
442495       >>> import  calendar
443496       >>> list (calendar.month_name)
@@ -516,7 +569,7 @@ The :mod:`calendar` module defines the following exceptions:
516569
517570.. _calendar-cli :
518571
519- Command-Line Usage 
572+ Command-line usage 
520573------------------ 
521574
522575.. versionadded :: 2.5 
@@ -654,6 +707,9 @@ The following options are accepted:
654707   The number of months printed per row.
655708   Defaults to 3.
656709
710+ .. versionchanged :: next 
711+    By default, today's date is highlighted in color and can be
712+    :ref: `controlled using environment variables  <using-on-controlling-color >`.
657713
658714*HTML-mode options: *
659715
0 commit comments