Making sure that the start and end date are not part of the comparison that updates the current flags