Added date handling and tests.