Java tutorial
import java.util.Calendar; public class Main { public static void main(String[] args) { Calendar cal = Calendar.getInstance(); // return the minimum value that the year field could have int i = cal.getActualMinimum(Calendar.YEAR); System.out.println("Minimum Year :" + i); // returns the minimum value that the month field could have int a = cal.getActualMinimum(Calendar.MONTH); System.out.println("Minimum month :" + a); } }