Here you can find the source of hasYearPassed(int year)
public static boolean hasYearPassed(int year)
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { private static Calendar NOW = Calendar.getInstance(); public static boolean hasYearPassed(int year) { return normalizeYear(year) < NOW.get(Calendar.YEAR); }//w w w. j a v a 2 s . c o m /** Expand two-digit year to four-digit if necessary. */ public static int normalizeYear(int year) { if (0 <= year && year < 100) { int currentYear = NOW.get(Calendar.YEAR); year = currentYear / 100 + year; } return year; } }