Closed Clodolt closed 2 years ago
@Clodolt Hey, thanks for helping out with the code! There are several weird gotchas that I've had to deal with when making this Event Page, and one of them seems to be popping back up with this PR:
When the time is about to roll over to a new day (right before 00:00) it is supposed to show events that will happen all the way up to about 05:00 the next day, so events that happen at 00:00, 01:00, should be visible before the actual day begins. With this PR, it seems that at 23:59, it no longer shows events that will happen the next day until the clock reaches 00:00.
This is how it should look:
I was previously able to test this using the code under //Test Time in the refreshClock() function, if that helps!
Hello Salty,
this should be adressed now, overlooked the fact that event.times returns a string.
Let me know if you find any other bugs/edge cases :)
Hey @Clodolt ,
It still doesn't seem to be showing events after 24:00
Also, can we get back the humanized time text under the events? So instead of "3 hour 23 minutes and 51 seconds" it says "4 hours" etc
Hello @datmeal,
Sorry for the late reply, it's been a busy week.
I've tested it on Chrome 100.0.4896, FireFox 99.0 and Safari 15.3 now and it seems to be working (see screenshot below)
Did you fetch my branch properly?
Also, removed the seconds at your request :)
Okay, I confirmed again and it seems to be working, so yea maybe I messed up the branch? I'm gonna change how the time is described but this branch is OK so I will merge :) thanks for your help! Now that new content is gonna be released.....time for more work.......
Note: Two instances are left as the instances of moment.js are left as they seem redundant but break the code if changed at all
Instance 1:
let eventTime = moment(time, "HH:mm") // .subtract(offsetSeconds, "seconds") .format("HH:mm");
Instance 2:
const eventTime = moment(timeText, "HH:mm").format("HH:mm");