fixed boundary condition on issue #3 for endDate is endOfDay