Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. public function rangesOverlap($date1A, $date1Z, $date2A, $date2Z)
  2. {
  3. if ($date1A > $date2Z) return false; // first range is after the second
  4. if ($date2Z < $date1Z) return false; // second range is before the first
  5.  
  6. // they must overlap
  7. return true;
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement