Skip to content

Commit 62fa485

Browse files
nit: add comments for timestamp modes
Signed-off-by: onerandomusername <genericusername414+git@gmail.com>
1 parent e41125f commit 62fa485

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

modmail/utils/time.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@ class TimeStampEnum(enum.Enum):
1313
https://discord.com/developers/docs/reference#message-formatting
1414
"""
1515

16-
SHORT_TIME = "t"
17-
LONG_TIME = "T"
18-
SHORT_DATE = "d"
19-
LONG_DATE = "D"
20-
SHORT_DATE_TIME = "f"
21-
LONG_DATE_TIME = "F"
22-
RELATIVE_TIME = "R"
23-
24-
# DEFAULT
16+
# fmt: off
17+
SHORT_TIME = "t" # 16:20
18+
LONG_TIME = "T" # 16:20:30
19+
SHORT_DATE = "d" # 20/04/2021
20+
LONG_DATE = "D" # 20 April 2021
21+
SHORT_DATE_TIME = "f" # 20 April 2021 16:20
22+
LONG_DATE_TIME = "F" # Tuesday, 20 April 2021 16:20
23+
RELATIVE_TIME = "R" # 2 months ago
24+
25+
# fmt: on
26+
# DEFAULT alised to the default, so for all purposes, it behaves like SHORT_DATE_TIME, including the name
2527
DEFAULT = SHORT_DATE_TIME
2628

2729

0 commit comments

Comments
 (0)