Here you can find the source of dateAdd(Date date, int val)
public static Date dateAdd(Date date, int val)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Date dateAdd(Date date, int val) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date);//from www . j a va 2 s . c o m calendar.add(Calendar.DAY_OF_MONTH, val); date = calendar.getTime(); return date; } }