Here you can find the source of isDateAfter(Date date1, Date date2)
public static boolean isDateAfter(Date date1, Date date2)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static boolean isDateAfter(Date date1, Date date2) { Calendar cal1 = Calendar.getInstance(); Calendar cal2 = Calendar.getInstance(); cal1.setTime(date1);//from www. j a v a 2 s . co m cal2.setTime(date2); return cal1.after(cal2); } }