New function for checking bounds within a day