Update functions.php

SETUP added day array overlapping check function