Java tutorial
import java.util.Calendar; import java.util.GregorianCalendar; public class Main { public static void main(String[] args) { // create a calendar Calendar cal = new GregorianCalendar(2010, 9, 15); // print the greatest min. for year field int result = cal.getGreatestMinimum(Calendar.YEAR); System.out.println("The minimum is: " + result); } }