Here you can find the source of addDates(Date startDate, int days)
public static Date addDates(Date startDate, int days)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Date addDates(Date startDate, int days) { Calendar cc = Calendar.getInstance(); if (startDate != null) { cc.setTime(startDate);/*from www . jav a 2 s .co m*/ cc.add(Calendar.DATE, days); return cc.getTime(); } else { return null; } } }