Correct date sorting.