Here you can find the source of getDateAdd(Date date, int amount)
public static Date getDateAdd(Date date, int amount)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Main { public static Date getDateAdd(Date date, int amount) { Calendar cal = new GregorianCalendar(); cal.setTime(date);// w ww . j a v a2s . c o m cal.add(GregorianCalendar.DATE, amount); return cal.getTime(); } }