Java tutorial
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static Date getDifferenceDaysDate(long times, int diffDay) { Calendar now = Calendar.getInstance(); Date d = new Date(); d.setTime(times); now.setTime(d); now.set(Calendar.DATE, now.get(Calendar.DATE) + diffDay); return now.getTime(); } }