Here you can find the source of isWithinYears(int year, java.util.Calendar start, java.util.Calendar end)
public static boolean isWithinYears(int year, java.util.Calendar start, java.util.Calendar end)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean isWithinYears(int year, java.util.Calendar start, java.util.Calendar end) { return ((start.get(java.util.Calendar.YEAR) < year) && (end.get(java.util.Calendar.YEAR) > year)); }/*from w w w . j a v a2 s . c o m*/ }