Hi,
I have an arraylist of objects, each containing a unique date in the following format
YEAR-DAY-MONTH HOUR:MINUTE:SECOND (example: 2010-02-10 23:32:14)
I'm trying to compare each object in the array list (there are a few thousand) with a incrementing timer class I created to check if both times match. It seems like the easiest way to check to see if the object and timer have matching dates would be to first sort the array list from earliest to latest, and then check each object individual, going on the next one in the list once one matches the timer. However, I'm not sure how I would sort an array list based on the previously mentioned time format. So far, my dated objects are have the following properties:
public float min;
public float hour;
public float day;
public float month;
public float year;
How could I sort an array list of these objects so that it was sorted from the earliest to latest date?