Skip to content

Commit 7cc4dcb

Browse files
alanzhu0shahsalonik
authored andcommitted
refactor(settings): change date format
1 parent 29899d2 commit 7cc4dcb

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

intranet/settings/__init__.py

+21-9
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,41 @@
2121
# July = 7
2222
YEAR_TURNOVER_MONTH = 7
2323

24-
# School years spans 2 calendar years. start_school_year is the year the school year starts in, and end_school_year is the year the school year ends in.
24+
# School years span 2 calendar years.
25+
# start_school_year is the year the school year starts in, and end_school_year is the year the school year ends in.
2526
# For example, for the 2022-2023 school year, start_school_year = 2022 and end_school_year = 2023.
2627
start_school_year = datetime.date.today().year - 1 if datetime.date.today().month < YEAR_TURNOVER_MONTH else datetime.date.today().year
2728
end_school_year = start_school_year + 1
2829

29-
30+
# fmt: off
3031
""" !! -------- UPDATE ANNUALLY -------- !!
3132
Update this section annually after summer school ends and before school starts.
32-
Last updated: 2022-08-30. """
33+
School year last updated: 2022-08-30
34+
Hoco last updated: 2022-08-30
35+
"""
3336

3437
# When school is scheduled to start and end
35-
SCHOOL_START_DATE = datetime.date(start_school_year, 8, 22)
36-
SCHOOL_END_DATE = datetime.date(end_school_year, 6, 16)
38+
SCHOOL_START_DATE = datetime.date(start_school_year,
39+
8, 22 # UPDATE THIS! Value when last updated: August 22, 2022 # noqa: E128
40+
) # noqa: E124
41+
SCHOOL_END_DATE = datetime.date(end_school_year,
42+
6, 16 # UPDATE THIS! Value when last updated: June 16, 2023 # noqa: E128
43+
) # noqa: E124
3744

3845
# Dates when hoco starts and ends
39-
HOCO_START_DATE = datetime.date(start_school_year, 9, 19)
40-
HOCO_END_DATE = datetime.date(start_school_year, 9, 24)
46+
HOCO_START_DATE = datetime.date(start_school_year,
47+
9, 19 # UPDATE THIS! Value when last updated: September 19, 2022 # noqa: E128
48+
) # noqa: E124
49+
HOCO_END_DATE = datetime.date(start_school_year,
50+
9, 24 # UPDATE THIS! Value when last updated: September 24, 2022 # noqa: E128
51+
) # noqa: E124
4152

4253
""" -------- END UPDATE ANNUALLY -------- """
54+
# fmt: on
4355

4456
# Default fallback time for start and end of school if no schedule is available
45-
SCHOOL_START_HOUR = 8 # Not currently used
46-
SCHOOL_START_MINUTE = 40 # Not currently used
57+
SCHOOL_START_HOUR = 8
58+
SCHOOL_START_MINUTE = 40
4759
SCHOOL_END_HOUR = 16
4860
SCHOOL_END_MINUTE = 0
4961

0 commit comments

Comments
 (0)