I have a database of events (which I pull regularly from an API). Each event has a begin and end time (format YYYY-MM-DD HH:MM:SS). I'm using PHP to displaying these events on a HTML table calendar. So far no problem.
I need to show an "available" message between events. For example, if there is an event from 06:12 to 09:55, I need the calendar to display a message saying "available" from 00:00 to 06:12, and again from 09:55 to 23:59. There could (and usually will be) multiple events and multiple availability periods each day.
What's the best approach here? My puzzler has puzzled itself sore.