How to check for overlapping events

Just in case someone still finds this old thread — THIS is the ultimate answer: