Added support to sort by date.