Hey All, I have a question that i have been bugging me for about a year now. I think it is time i tackle this problem head on and try to produce a solution. You help would be appreciated.

So imagine i have some reoccurring events. Such as scheduled events that occur every week. Like a garden timer. Specifically a garden timer.
For the sake of this explanation i have drawn up a couple of random events, and "NOW".
So the image shows EVENT 1 occurs every Tue, 2313hrs. EVENT 2 occurs every Fri, 2330hrs. The third relevent event is NOW, which is this moment of time.
I want to create like a countdown timer between NOW and the NEXT event. In this example, the next event is EVENT1.
Task 1: Create a code to identify which event, EVENT 1 or EVENT 2, is the NEXT event.
One of the problems i face around creating a countdown timer is that the events are reoccurring. So for example, now is Saturday, the next event is Tuesday, then the next event after that is Friday. After friday's event, the next event is Tuesday, then Fri, and so on forever.
Task 2: Create a code that counts down the time between NOW and the NEXT event.
I have a very crude idea as to what i plan to do. I would love to try and explain it here but it would take forever to explain, and it would likely not be the final solution anyhow.
Has anyone tried to do something like this in the past?

So imagine i have some reoccurring events. Such as scheduled events that occur every week. Like a garden timer. Specifically a garden timer.
For the sake of this explanation i have drawn up a couple of random events, and "NOW".
So the image shows EVENT 1 occurs every Tue, 2313hrs. EVENT 2 occurs every Fri, 2330hrs. The third relevent event is NOW, which is this moment of time.
I want to create like a countdown timer between NOW and the NEXT event. In this example, the next event is EVENT1.
Task 1: Create a code to identify which event, EVENT 1 or EVENT 2, is the NEXT event.
One of the problems i face around creating a countdown timer is that the events are reoccurring. So for example, now is Saturday, the next event is Tuesday, then the next event after that is Friday. After friday's event, the next event is Tuesday, then Fri, and so on forever.
Task 2: Create a code that counts down the time between NOW and the NEXT event.
I have a very crude idea as to what i plan to do. I would love to try and explain it here but it would take forever to explain, and it would likely not be the final solution anyhow.
Has anyone tried to do something like this in the past?


