Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit adddbc3

Browse filesBrowse files
[3.12] gh-108202: Document calendar.Calendar.firstweekday (GH-128566) (#128580)
(cherry picked from commit b3cbd8f) Co-authored-by: Erlend E. Aasland <erlend@python.org>
1 parent 115d504 commit adddbc3
Copy full SHA for adddbc3

File tree

1 file changed

+16
-4
lines changed
Filter options

1 file changed

+16
-4
lines changed

‎Doc/library/calendar.rst

Copy file name to clipboardExpand all lines: Doc/library/calendar.rst
+16-4Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,33 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
3838
itself. This is the job of subclasses.
3939

4040

41-
:class:`Calendar` instances have the following methods:
41+
:class:`Calendar` instances have the following methods and attributes:
42+
43+
.. attribute:: firstweekday
44+
45+
The first weekday as an integer (0--6).
46+
47+
This property can also be set and read using
48+
:meth:`~Calendar.setfirstweekday` and
49+
:meth:`~Calendar.getfirstweekday` respectively.
4250

4351
.. method:: getfirstweekday()
4452

45-
Return an :class:`int` for the current first weekday (0-6).
53+
Return an :class:`int` for the current first weekday (0--6).
54+
55+
Identical to reading the :attr:`~Calendar.firstweekday` property.
4656

4757
.. method:: setfirstweekday(firstweekday)
4858

49-
Set the first weekday to *firstweekday*, passed as an :class:`int` where Monday is 0 and Sunday is 6.
59+
Set the first weekday to *firstweekday*, passed as an :class:`int` (0--6)
60+
61+
Identical to setting the :attr:`~Calendar.firstweekday` property.
5062

5163
.. method:: iterweekdays()
5264

5365
Return an iterator for the week day numbers that will be used for one
5466
week. The first value from the iterator will be the same as the value of
55-
the :attr:`firstweekday` property.
67+
the :attr:`~Calendar.firstweekday` property.
5668

5769

5870
.. method:: itermonthdates(year, month)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.