]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-131146: Fix month names in a "standalone form" in calendar module (GH-131147)
authorDzmitry Plashchynski <plashchynski@gmail.com>
Thu, 31 Jul 2025 12:06:33 +0000 (15:06 +0300)
committerGitHub <noreply@github.com>
Thu, 31 Jul 2025 12:06:33 +0000 (14:06 +0200)
commit438cbd857a875efc105b4215b1ae131e67af37e1
tree341bbf708d8dd1d80f0b8126326b9965256281e2
parent0282eef880c8c8db782a2088b0257250e0f76d48
gh-131146: Fix month names in a "standalone form" in calendar module (GH-131147)

The calendar module displays month names in some locales using the genitive case.
This is grammatically incorrect, as the nominative case should be used when the month
is named by itself. To address this issue, this change introduces new lists
`standalone_month_name` and `standalone_month_abbr` that contain month names in
the nominative case -- or more generally, in the form that should be used to
name the month itself, rather than form a date.

The module now uses the `%OB` format specifier to get month names in this form
where available.
Doc/library/calendar.rst
Lib/calendar.py
Lib/test/test_calendar.py
Misc/NEWS.d/next/Library/2025-03-17-21-21-06.gh-issue-131146.A5Obgv.rst [new file with mode: 0644]