Improved printed format for sortByDate(). Passed test 1 for sortByDate().