Currently I am trying to sort my list by dates:
Collections.sort(unsortedDates, new Comparator<Item>() {
public int compare(Item m1, Item m2) {
return m1.getDate().compareTo(m2.getDate());
}
});
But I want the list to be sorted so the anchor date will be today, the first item should be the closest date for the current date.
The date format is MM/dd
.
getDate()
returns a Date
object.