Alternating week and show correct day

So I am currently building a school timetable app and it’s going good so far I’m building it in staging because it will be easier but then will rebuild it in the stable version. But I’m stuck my secondary school has an alternating timetable so we have a week 1 and week 2. The app must be able to know what week it is and what day to show on the home screen.
So say it’s 17/09/2021 then the app must recognise that it is week 1 Friday and show that schedule on the homepage.
Any ideas on how I would do this would be appreciated thanks.

Forgot to mention say we go off on a school holiday eg. easter, Christmas and Halloween then it messes the week up so the user would have to enter what week it is for them but I would like it fully automated otherwise

First of all, can you explain your reason for building in Staging? Do you mean Glide’s Staging environment? It’s not stable and apps could be deleted. I only ask why you would build it there instead of a second app in Glide’s production environment? Just seems risky to me.

To answer your question, you could have a math column with the following formula. If the number is zero, then it’s an even numbered week. Anything other than zero (0.5), then it’s an odd numbered week. You could have it check the the current day’s week number to see which timetable to show.

MOD(WEEKNUM(date)/2,1)

2 Likes

I’d be happy to help you with this as I’ve built some complex school scheduling functionality.

Here’s our school schedule for example: