Here you can find the source of addDateDay(int day)
public static Date addDateDay(int day)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Date addDateDay(int day) { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.DATE, day); return calendar.getTime(); }/*from ww w . j ava 2 s. c o m*/ public static Date addDateDay(Date date, int day) { if (null == date) { return null; } Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.add(Calendar.DATE, day); return calendar.getTime(); } }