Here you can find the source of getDateAfter(Date date, int increment)
public static Date getDateAfter(Date date, int increment)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; public class Main { public static Date getDateAfter(Date date, int increment) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date);/* w ww . j a v a 2 s. c o m*/ calendar.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); calendar.add(Calendar.DAY_OF_YEAR, increment); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); return calendar.getTime(); } }