Add exceptions feature

This commit is contained in:
DogeyStamp 2021-04-22 19:10:38 -04:00
parent faa23b2fe7
commit 1f3e2a414d
2 changed files with 8 additions and 1 deletions

View File

@ -61,9 +61,13 @@ vacation_days = [[datetime.datetime(2020,9,7,0,0,0,0)],
[datetime.datetime(2021,5,24,0,0,0,0)],
[datetime.datetime(2020,11,20,0,0,0,0)],
[datetime.datetime(2020,11,27,0,0,0,0)]]
# In the event you need to completely disrupt the cycle, add an exception
exceptions = [
[datetime.datetime(2021,4,22,0,0,0,0),3],
[datetime.datetime(2021,4,23,0,0,0,0),1]]
# Start of the schedule year
start_date = datetime.datetime(2020, 8, 28, 0, 0, 0, 0)
# End of the schedule year
end_date = datetime.datetime(2021, 6, 22, 0, 0, 0, 0)
#in case you're too lazy to modify the start date or vacation days
# In case you're too lazy to modify the start date or vacation days
offset = 0

View File

@ -41,6 +41,9 @@ while True:
if current_date == vacation[0]:
school = False
break
for exception in exceptions:
if exception[0] == current_date:
day = exception[1]
if not school:
continue
if current_date > end_date: