Here you can find the source of calculateMaxStartDate(Calendar calendar, int daysAhead)
private static Date calculateMaxStartDate(Calendar calendar, int daysAhead)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { private static Date calculateMaxStartDate(Calendar calendar, int daysAhead) { calendar.add(Calendar.DAY_OF_YEAR, daysAhead); return calendar.getTime(); }//from w ww . j a va 2s .c om }