Enable les again

This commit is contained in:
Stijn De Clercq 2021-04-18 23:24:46 +02:00
parent 7118a80d5d
commit d240c3c50f
3 changed files with 18 additions and 21 deletions

View file

@ -24,13 +24,14 @@ def createEmbed(day, dayDatetime, semester, year, schedule):
startDate = 1612224000
currentTime = dayDatetime.timestamp()
# TODO don't clamp because week 1 is calculated as week 0!!
week = clamp(timeFormatters.timeIn(currentTime - startDate, "weeks")[0], 1, 13)
# Compensate for easter holidays
# Sorry but I don't have time to make a clean solution for this rn
# this will have to do
if currentTime > 1617377400:
week -= 2
# Does -1 instead of -2 because weeks were 0-indexed all along
week -= 1
title, week = getTitle(day, dayDatetime, week)