![]() |
|
laziness, impatience, and hubris | |
PerlMonks |
Re: Representing windows of time in a stringby Limbic~Region (Chancellor) |
on Oct 30, 2003 at 17:03 UTC ( #303327=note: print w/replies, xml ) | Need Help?? |
Nitrox,
As I mentioned in the CB, The Panther has a section on using bitmap vectors to determine scheduling conflicts. It is just a matter of logically AND-ing the two bitmaps. Each hour in the week would be one bit. You would be storing a 21 byte bitmap vector. If the bit is set, then there is a problem if the event happens at this hour. The task then is to design a way to parse your range and localtime() into the bitmap vector. The following is very basic, but it gives you a fully functional framework. Expand it as you see fit.
I hope this helps - L~R
In Section
Seekers of Perl Wisdom
|
|