Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.Date; public class Main { public static boolean compareDates(Date thisDate, Date todayDate) { int results = todayDate.compareTo(thisDate); if (results > 0) System.out.println("First Date is after second"); else if (results < 0) System.out.println("First Date is before second"); else return true; return false; } }