Closed ngshaohui closed 7 years ago
There are also 15 mins offset slots, 10 mins offset etc etc. we hence decided ignore these cases and model it by hourly slots, allowing simplify the problem and store the timetable into a 40 char-array (16hr*5day in nusmods).
To avoid half hour slots disappearing, we round down the start time and round up the end time. this means that a 1 hour slot starting and ending on half hours will appear as 2 hours in the bot. It's not perfect but it's a compromise to simplify the problem of strong timings into a db.
you are, however free to submit a PR to fix it and migrate the existing db 😀
👍
https://github.com/Tzyinc/FreeANot_bot/blob/98beb3cfac952c1c1e649d8ad2a1d7bdc7c81326/index.js#L220
Should account for lessons that start in between whole hours
e.g. http://modsn.us/84RbS
The thursday 7.30 - 9.30 slot will incorrectly span from 7-10 instead