Comparing date ranges

  • Thread starter Thread starter Ralph
  • Start date Start date
R

Ralph

How do I compare two date ranges for potential conflicts? For instance date
range 1 has a begin date of 3/1/09 and and end date of 3/15/09 and date
range 2 has a begin date of 3/10/09 and end date of 4/1/09. Date range 1 and
date range 2 have a conflict. help?
 
The core logic is that 2 events overlap if both:
- A begins before B ends, and
- B begins before A ends.

You will see that this is true if you draw timelines representing the
events:
------
---------------
------
-----------

Details in:
Clashing Events/Appointments
at:
http://allenbrowne.com/appevent.html
 
Back
Top