is Future Date - Java java.util

Java examples for java.util:Date Compare

Description

is Future Date

Demo Code


//package com.java2s;
import java.util.Calendar;

import java.util.GregorianCalendar;

public class Main {
    public static void main(String[] argv) throws Exception {
        Calendar calToCheck = Calendar.getInstance();
        System.out.println(isFutureDate(calToCheck));
    }// ww w .  ja  va2s  .c  o m

    public static boolean isFutureDate(Calendar calToCheck) {
        return calToCheck.after(GregorianCalendar.getInstance());
    }
}

Related Tutorials