Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Documented TextCalendar methods
Signed-off-by: apurvakhatri <apurvakhatri2011@gmail.com>
  • Loading branch information
apurvakhatri committed Aug 30, 2023
commit ef61b8cdfd345566774315b1eb334ded30426825
29 changes: 23 additions & 6 deletions Doc/library/calendar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,29 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is

.. method:: prweek(theweek, width)

Print a week's calendar as returned by :meth:`formatweek`.
Print a week's calendar as returned by :meth:`formatweek` and sets the
Comment thread
hugovk marked this conversation as resolved.
Outdated
end parameter to an empty string to prevent adding a newline character.
Comment thread
hugovk marked this conversation as resolved.
Outdated

.. method:: formatday(day, weekday, width)

Return a string containing the formatted day.

.. method:: formatweek(theweek, width)

Return a single formatted week, with each day formatted using :meth:`formatday`

.. method:: formatweekday(theweek, width)

Return a formatted week day name.

.. method:: formatweekheader(width)

Return the formatted header for a week, containing the weekday names, with
each day formatted using :meth:`formatweekday`.

.. method:: formatmonthname(theyear, themonth, width, withyear)

Return a formatted month name, optinally including the year.

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

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

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

.. data:: mdays

An array that represents the number of days in each month.


.. data:: day_name

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