Iterate the List
obtain the flight details and define a range of Date which you want to obtain
List<Flight> flights=new ArrayList<Flight>();
for(Flight f:flights)
{
Date d=f.getDate();
if(d is within the desired range)
{
//your logic in here
}
}
If you want a logic from scratch what you can do is obtain the current time in millseconds
and substract the milliseconds consisted in a day(i.e.. 86400000
) from current time in milliseconds
Calendar c= Calendar.getInstance();
System.out.println(c.getTimeInMillis()-86400000); // This will give the date one day before the current date
Date d=new Date(c.getTimeInMillis()-86400000);
System.out.println(d.toString());