private boolean isEventsCollide(WeekViewEvent event1, WeekViewEvent event2) {
        long start1 = event1.getStartTime().getTimeInMillis();
        long end1 = event1.getEndTime().getTimeInMillis();
        long start2 = event2.getStartTime().getTimeInMillis();
        long end2 = event2.getEndTime().getTimeInMillis();
        return !((start1 >= end2) || (end1 <= start2));
    }
Checks if two events overlap.
@param event1 The first event.
@param event2 The second event.
@return true if the events overlap.
library/src/main/java/com/alamkanak/weekview/WeekView.java