tests and date handling