Here you can find the source of isOverCurrentDate(int day, int month, int year, int maxDay, int maxMonth, int maxYear)
public static boolean isOverCurrentDate(int day, int month, int year, int maxDay, int maxMonth, int maxYear)
//package com.java2s; public class Main { public static boolean isOverCurrentDate(int day, int month, int year, int maxDay, int maxMonth, int maxYear) { if (year > maxYear) return true; else if (month > maxMonth && year == maxYear) return true; else if (day > maxDay && month == maxMonth && year == maxYear) return true; else//from w w w . j a va2 s . c o m return false; } }