Skip to content

Commit

Permalink
pythongh-108202: Document calendar.Calendar.firstweekday
Browse files Browse the repository at this point in the history
  • Loading branch information
erlend-aasland committed Jan 6, 2025
1 parent 953b49e commit 8133ed1
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions Doc/library/calendar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,27 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
itself. This is the job of subclasses.


:class:`Calendar` instances have the following methods:
:class:`Calendar` instances have the following methods and attributes:

.. attribute:: firstweekday

The first weekday as an integer (0--6).

This property can also be set and read using
:meth:`~Calendar.setfirstweekday` and
:meth:`~Calendar.getfirstweekday` respectively.

.. method:: getfirstweekday()

Return an :class:`int` for the current first weekday (0-6).
Return an :class:`int` for the current first weekday (0--6).

Identical to the reading the :attr:`firstweekday` property.

.. method:: setfirstweekday(firstweekday)

Set the first weekday to *firstweekday*, passed as an :class:`int` where Monday is 0 and Sunday is 6.
Set the first weekday to *firstweekday*, passed as an :class:`int` (0--6)

Identical to the setting the :attr:`firstweekday` property.

.. method:: iterweekdays()

Expand Down

0 comments on commit 8133ed1

Please sign in to comment.