Here you can find the source of addDate(java.util.Date date, int day)
public static java.util.Date addDate(java.util.Date date, int day)
//package com.java2s; //License from project: Apache License public class Main { public static java.util.Date addDate(java.util.Date date, int day) { java.util.Calendar c = java.util.Calendar.getInstance(); c.setTime(date);// www . j a v a 2 s . co m c.setTimeInMillis(c.getTimeInMillis() + (long) day * 24 * 3600 * 1000); return c.getTime(); } }