![]() |
|
Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
Advanced Perl Programming, otherwise known as the Panther book from O'Reilly & Assoc. has a discussion that you would probably find beneficial. Chapter two, section three:
Consider that there are only 24 * 7 = 168 hours in a week, the entire week's schedule can be represented by a bitmap vector of 21 bytes (168 / 8) .... The other cool thing is that you can obtain time conflicts by logically AND-ing two bitmaps. The implementation example provided in the book uses vec to construct the bitmaps, and logical 'and' to check for overlaps. Hope this helps...
Dave "If I had my life to live over again, I'd be a plumber." -- Albert Einstein In reply to Re: Representing windows of time in a string
by davido
|
|