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