mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 15:48:29 +02:00
Enable les again
This commit is contained in:
parent
7118a80d5d
commit
d240c3c50f
3 changed files with 18 additions and 21 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue