fixes off by one error when creating dates