implements Comparator and used for arranging sales by date