Rounding and validation of dates