Schedule algebra
How can we think more formally about our schedule? A schedule covers every minute of the day from midnight to the last minute before midnight 24 hours later.
00:00 23:59
|....................................|
Such a day has always at least one event which then needs to stretch across the full day, or it can have multiple events scattered around the day. In any case every minute of the day needs to be covered by some event.
00:00 09:00 12:00 23:59
|.........|.......|..................|
Each event
For the whole schedule
To add a new event
condition on x | on y | replace |
---|---|---|
Squinting a bit this looks like it could be further simplified. But that’s for another time.