Here you can find the source of before(Date sDate, Date eDate)
public static boolean before(Date sDate, Date eDate)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Main { public static boolean before(Date sDate, Date eDate) { Calendar sCal = new GregorianCalendar(); sCal.setTime(sDate);//w w w . j a v a2s . com Calendar eCal = new GregorianCalendar(); eCal.setTime(eDate); return sCal.before(eCal); } }