I have an arrayList.
This is an arrayList of strings. The string contains a \"Date.toString\"
in format of \"January 1, 1970, 00:00:00 GMT\"
+
I would convert this array list first to something like
public class Event {
private Date date;
private String description;
...
}
After that, create a comparator to compare 2 events like this:
public class EventComparator implements Comparator{
public int compare(Event e1, Event e2) {
return e1.getDate().compareTo(e2.getDate());
}
}
This will save you tons of performance compared with (pardon me) parsing each string for each comparison.