Here you can find the source of getTargetDate(Calendar reqCal, int diffMon, int proxyDay)
public static Date getTargetDate(Calendar reqCal, int diffMon, int proxyDay)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; public class Main { public static Date getTargetDate(Calendar reqCal, int diffMon, int proxyDay) { Calendar cal = null == reqCal ? Calendar.getInstance() : reqCal; cal.set(Calendar.MONTH, cal.get(Calendar.MONTH) + diffMon); cal.set(Calendar.DATE, proxyDay); Date date = cal.getTime(); return date; }//w w w . j av a2 s . c o m }