date computation was wrong