I have two Date objects in Java (Java.util.Date) that are being passed in to a method I am writing. I was thinking this would be fairly simple, but I can't think of a straight forward way to do this. I want to first figure out which date is greater and then figure out the difference between the two in days. Then I simply want to use a loop to create code that is something along the lines.. of
for (int i = o; i < distance between two dates in days; i++){
Date d = new Date("low date + i days");
dateList.add(d);
}
Date[] dateArray = dateList.ToArray();
I'm not entirely sure how to do this, since i'm not entirely sure how to get the distance between the dates in Days. I'm also not sure if this is the best method to sue to go about this. Can anyone help me out?
Thanks
Thank you!!