Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.13] gh-123445: calendar: Improve descriptions for day and month attributes (GH-123483) #124500

Open
wants to merge 1 commit into
base: 3.13
Choose a base branch
from
Open
Changes from all commits
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
24 changes: 20 additions & 4 deletions Doc/library/calendar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -393,13 +393,22 @@ The :mod:`calendar` module exports the following data attributes:

.. data:: day_name

An array that represents the days of the week in the current locale.
A sequence that represents the days of the week in the current locale,
where Monday is day number 0.

>>> import calendar
>>> list(calendar.day_name)
['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']


.. data:: day_abbr

An array that represents the abbreviated days of the week in the current locale.
A sequence that represents the abbreviated days of the week in the current locale,
where Mon is day number 0.

>>> import calendar
>>> list(calendar.day_abbr)
['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']

.. data:: MONDAY
TUESDAY
Expand All @@ -426,17 +435,24 @@ The :mod:`calendar` module exports the following data attributes:

.. data:: month_name

An array that represents the months of the year in the current locale. This
A sequence that represents the months of the year in the current locale. This
follows normal convention of January being month number 1, so it has a length of
13 and ``month_name[0]`` is the empty string.

>>> import calendar
>>> list(calendar.month_name)
['', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']


.. data:: month_abbr

An array that represents the abbreviated months of the year in the current
A sequence that represents the abbreviated months of the year in the current
locale. This follows normal convention of January being month number 1, so it
has a length of 13 and ``month_abbr[0]`` is the empty string.

>>> import calendar
>>> list(calendar.month_abbr)
['', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']

.. data:: JANUARY
FEBRUARY
Expand Down
Loading