Java tutorial
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static boolean isPast(Date date) { boolean isPast = false; Date currentTime = new Date(); Calendar cal = Calendar.getInstance(); cal.setTime(currentTime); Calendar calCurrentView = Calendar.getInstance(); calCurrentView.setTime(date); isPast = cal.getTime().after(calCurrentView.getTime()); return isPast; } }