Sorted date object error