The purpose of the program I'm making is to check dates and if the date has passed it should show the next date.
For example, todays date is 14/10/2013. The next episode of How I Met Your Mother is today, and the one after that is 11/11/2013.
I want to program to show the date 14/10/2013, but tomorrow it should show 11/11/2013. Here is what I have:
public class CheckSeries {
public static void main (String[] args){
SimpleDateFormat d = new SimpleDateFormat("dd/MM/yyyy");
Date today = new Date();
System.out.println(d.format(today));
try { // Here is where I add the times. I know it's not the most productive way, but one step at a time
Date d0 = d.parse("14/10/2013");
Date d1 = d.parse("11/11/2013");
Date etc = d.parse("etc/etc/etc");
}
}
So, I need it to check d0, if it is before today it should check d1, then d2 etc etc. But if say, d1 is after today it should just show d1 in a JFrame (which I know how to do, ill add the Jframe later) But I don't know how to do that. (I think).