sort the years and dates