Here you can find the source of addDate(Calendar baseDate, int addDate)
public static Calendar addDate(Calendar baseDate, int addDate)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { public static Calendar addDate(Calendar baseDate, int addDate) { return add(baseDate, 0, 0, addDate, 0, 0, 0, 0); }/*www.j a va2 s. com*/ public static Calendar add(Calendar cal, int addYera, int addMonth, int addDate, int addHour, int addMinute, int addSecond, int addMillisecond) { if (cal == null) { cal = Calendar.getInstance(); } cal.add(Calendar.YEAR, addYera); cal.add(Calendar.MONTH, addMonth); cal.add(Calendar.DATE, addDate); cal.add(Calendar.HOUR_OF_DAY, addHour); cal.add(Calendar.MINUTE, addMinute); cal.add(Calendar.SECOND, addSecond); cal.add(Calendar.MILLISECOND, addMillisecond); return cal; } }