possible bug fix for planByDate day - 1