fix date off-by-one error