Here you can find the source of addDay(Date date, int days)
public static Date addDay(Date date, int days)
//package com.java2s; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Main { public static Date addDay(Calendar c, int days) { if (c == null) return null; c.add(Calendar.DAY_OF_MONTH, days); return c.getTime(); }/*from www . j ava 2s . c o m*/ public static Date addDay(Date date, int days) { Calendar c = getCalendar(date); if (c == null) return null; c.add(Calendar.DAY_OF_MONTH, days); return c.getTime(); } public static Calendar getCalendar(Date date) { if (date == null) return null; Calendar c = new GregorianCalendar(); c.setTime(date); return c; } }