The very first thing that came to my mind after reading the OP was the method DateTime::Span::contains. However, yours is the right approach since that method only works for sets that are fully inside, as the manual says.
Thanks!
In reply to Re^3: Check if Date interval contains Hour X
by alexm
in thread Check if Date interval contains Hour X
by gulden
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |