Skip to content

Commit ef61b8c

Browse files
committed
Documented TextCalendar methods
Signed-off-by: apurvakhatri <[email protected]>
1 parent 2aabadf commit ef61b8c

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

Doc/library/calendar.rst

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,29 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
192192

193193
.. method:: prweek(theweek, width)
194194

195-
Print a week's calendar as returned by :meth:`formatweek`.
195+
Print a week's calendar as returned by :meth:`formatweek` and sets the
196+
end parameter to an empty string to prevent adding a newline character.
197+
198+
.. method:: formatday(day, weekday, width)
199+
200+
Return a string containing the formatted day.
201+
202+
.. method:: formatweek(theweek, width)
203+
204+
Return a single formatted week, with each day formatted using :meth:`formatday`
205+
206+
.. method:: formatweekday(theweek, width)
207+
208+
Return a formatted week day name.
209+
210+
.. method:: formatweekheader(width)
211+
212+
Return the formatted header for a week, containing the weekday names, with
213+
each day formatted using :meth:`formatweekday`.
214+
215+
.. method:: formatmonthname(theyear, themonth, width, withyear)
216+
217+
Return a formatted month name, optinally including the year.
196218

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

@@ -440,11 +462,6 @@ For simple text calendars this module provides the following functions.
440462

441463
The :mod:`calendar` module exports the following data attributes:
442464

443-
.. data:: mdays
444-
445-
An array that represents the number of days in each month.
446-
447-
448465
.. data:: day_name
449466

450467
An array that represents the days of the week in the current locale.

0 commit comments

Comments
 (0)