day comparator not working