Attempt at correcting error when date difference = 1