private static int calcYears(GregorianCalendar birthDay, GregorianCalendar checkDay, int birthMonth, int checkMonth) { 
        int years = checkDay.get(GregorianCalendar.YEAR) - birthDay.get(GregorianCalendar.YEAR); 
             
        if ( checkMonth < birthMonth ) { 
            years --; 
        } else  if (checkMonth == birthMonth 
                && checkDay.get(GregorianCalendar.DAY_OF_MONTH) < birthDay.get(GregorianCalendar.DAY_OF_MONTH)) { 
        
            years --; 
        } 
        return years; 
    }