I am having through getting setting the value of a GregorianCalendar to that of another one + 4 years. I see there s the add method in the class but this accepts an int and I am trying to pass a GregorianCalendar type.
public GregorianCalendar getEnrollmentDate(GregorianCalendar enrollmentDate){
return enrollmentDate;
}
public void setProjectedGraduationDate(GregorianCalendar projectedGraduationDate){
Calendar cal = new GregorianCalendar();
cal.setTime(this.enrollmentDate);
projectedGraduationDate = cal.add(Calendar.YEAR, 4);
}
The value that I am trying to add years to is "enrollmentDate"
Is this possible, the "setTime" method accepts a "Date" time, not a GregorianCalendar though.
public setProjectedGraduationDate(GregorianCalendar projectedGraduationDate){
projectedGraduationDate.setTime(this.enrollmentDate);
projectedGraduationDate.add(Calendar.YEAR, 4);
}