-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed
Labels
3.12only security fixesonly security fixesstdlibPython modules in the Lib dirPython modules in the Lib dirtype-featureA feature request or enhancementA feature request or enhancement
Description
From this discuss thread:
The
calendar
module already defines constants e.g.MONDAY
(0),TUESDAY
(1), etc. for the [days of the week] https://docs.python.org/3/library/calendar.html#calendar.MONDAY).Since these are likely to be commonly needed too, would it make sense for the calendar module to also export constants for all of
JANUARY
(1),FEBRUARY
(2), …,DECEMBER
(12)?This would allow one to write
from calendar import APRIL
and then e.g. useAPRIL
instead of4
when building adatetime.date
object.Related: datetime - Python module defining constants for month numbers? - Stack Overflow
Linked PRs
FObersteiner
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixesstdlibPython modules in the Lib dirPython modules in the Lib dirtype-featureA feature request or enhancementA feature request or enhancement
Projects
Status
Done