public class MainClass { public static void main(String[] a) {
GregorianCalendar today = new GregorianCalendar();
GregorianCalendar thisDate = new GregorianCalendar();
thisDate.set(Calendar.YEAR, 2000); if (thisDate.before(today)) {
System.out.println("before");
} if (today.after(thisDate)) {
System.out.println("after");
}
}
}