allow dateformat to be supplied.