summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend@python.org>2025-01-07 07:59:24 (GMT)
committerGitHub <noreply@github.com>2025-01-07 07:59:24 (GMT)
commitb3cbd8f1b58b9e71df20bdda9960e7d3190c509e (patch)
tree3fc9a8ee113a4c631f2495dfe91765a1792d86c0 /Doc/library
parente837a1f71e832ce8f551a6fac05e346f654457e0 (diff)
downloadcpython-b3cbd8f1b58b9e71df20bdda9960e7d3190c509e.zip
cpython-b3cbd8f1b58b9e71df20bdda9960e7d3190c509e.tar.gz
cpython-b3cbd8f1b58b9e71df20bdda9960e7d3190c509e.tar.bz2
gh-108202: Document calendar.Calendar.firstweekday (#128566)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/calendar.rst20
1 files changed, 16 insertions, 4 deletions
diff --git a/Doc/library/calendar.rst b/Doc/library/calendar.rst
index dadd301..f25930e 100644
--- a/Doc/library/calendar.rst
+++ b/Doc/library/calendar.rst
@@ -38,21 +38,33 @@ 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 reading the :attr:`~Calendar.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 setting the :attr:`~Calendar.firstweekday` property.
.. method:: iterweekdays()
Return an iterator for the week day numbers that will be used for one
week. The first value from the iterator will be the same as the value of
- the :attr:`firstweekday` property.
+ the :attr:`~Calendar.firstweekday` property.
.. method:: itermonthdates(year, month)