Skip to content

Conversation

@tomkooij
Copy link

I use klascal for looking up my Zermelo schedule. THANKS!
(In my own fork, I'm working on things useful for teachers, such as showing the schedule of other teachers) never mind that.

Today I noticed klascal was showing the schedule of january 2025. This is because we rolled over to week 01 of 2026, but it is still 2025.

// Dec, 29th
new Date().getMonth();  // 11
new Date().getDate(); // 29
new Date().getFullYear(); // 2025

// week 1 of 2026, but year is still 2025
new Date().getFullYear(); // 2025
new Date().getWeek(); // 1 

This is a quick fix.

@vercel
Copy link

vercel bot commented Dec 29, 2025

@tomkooij is attempting to deploy a commit to the klascal's projects Team on Vercel.

A member of the Team first needs to authorize it.

@tomkooij
Copy link
Author

tomkooij commented Dec 29, 2025

Never mind the force-push: I accidentally pushed a branch with my previous work. I rebased this on upstream/main and forced push.
EDIT1: I did not notice 3a9ef2a .
EDIT2: merged it in. Bug was still present. Seems fixed on this branch.

If week 1 starts in december, set the year to next year, to
fetch correct schedule from Zermelo

Example:
In 2026 week 1 starts in december 2025. Week===1 is in december.
We need to fetch the liveschedule of week=202601 instead of 202501

Also (without this fix) klascal will jump to week 2 of 2025
(instead of 2026) when moving to the next week.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant