/
months.py
56 lines (48 loc) · 1.1 KB
/
months.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"""
This module contains all string representations of months, used by :class:`~integreat_cms.cms.models.events.event.Event`.
"""
from __future__ import annotations
from typing import TYPE_CHECKING
from django.utils.translation import gettext_lazy as _
if TYPE_CHECKING:
from typing import Final
from django.utils.functional import Promise
#: January
JANUARY: Final = 0
#: February
FEBRUARY: Final = 1
#: March
MARCH: Final = 2
#: April
APRIL: Final = 3
#: May
MAY: Final = 4
#: June
JUNE: Final = 5
#: July
JULY: Final = 6
#: August
AUGUST: Final = 7
#: September
SEPTEMBER: Final = 8
#: October
OCTOBER: Final = 9
#: November
NOVEMBER: Final = 10
#: December
DECEMBER: Final = 11
#: Choices to use these constants in a database field
CHOICES: Final[list[tuple[int, Promise]]] = [
(JANUARY, _("January")),
(FEBRUARY, _("February")),
(MARCH, _("March")),
(APRIL, _("April")),
(MAY, _("May")),
(JUNE, _("June")),
(JULY, _("July")),
(AUGUST, _("August")),
(SEPTEMBER, _("September")),
(OCTOBER, _("October")),
(NOVEMBER, _("November")),
(DECEMBER, _("December")),
]