I am struggling a little bit to find a nice data representation for a fairly typical scheduling app. The requirements which mess things up a bit is that there are two parties each who have an arbitrary availability daily and there are courses which are offered more or less at fixed times (though exceptions can occur here as well) independent of whether there are two parties available at that timing or not.
As one of the challenges later will be to find available providers for the scheduled courses, I was wondering whether a quick and elegant way could be to simply store a weekly availability pattern for these in a 64-bit integer with a kind of bit-mask.
My rationale is that essentially, every day has 24 hours (< 2^5) and splitting the day into 10 minute intervals there are 144 slots per day (much less than 2^8). Therefore, every person could get a weekly schedule with every day being an 8 bit availability mask for that day (7 x 8bit = 56 bit, less than a 64 bit int).
Filtering and identifying of potential users can very quickly and simply be done by converting any potential appointments into the same kind of mask and then just doing a bitwise operation to only select candidates which are available there without bothering about further rules etc.
What I am wondering is what the reasons are why I don't see much more filtering happening on bit-level as it seems to be fairly straight forward and I'm guessing will hopefully actually even end up being more elegant than a more verbose and explicit logic, any thoughts/ideas?