Sort date

Fixes #451