Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Closed
Description
Fromthis discuss thread:
The
calendarmodule 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 APRILand then e.g. useAPRILinstead of4when building adatetime.dateobject.Related:datetime - Python module defining constants for month numbers? - Stack Overflow
Linked PRs
Metadata
Metadata
Assignees
Labels
Projects
Status
Done