Lots of fixes for dates and validation of dates.