Test for date function.