Here you can find the source of addDay(Date oriDate, int amount)
public static Date addDay(Date oriDate, int amount)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class Main { public static Date addDay(Date oriDate, int amount) { Calendar cal = Calendar.getInstance(); cal.setTime(oriDate);/* w w w. j av a 2 s . c o m*/ cal.add(Calendar.DAY_OF_MONTH, amount); return cal.getTime(); } public static String getTime(String pattern) { return new SimpleDateFormat(pattern).format(new Date()); } }