Here you can find the source of getAfterEndDate(Integer day)
public static Date getAfterEndDate(Integer day)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static Date getAfterEndDate(Integer day) { Date date = new Date(); if (day == null) { return date; }/*from w ww. j a v a 2 s .c o m*/ Calendar cal = Calendar.getInstance(); cal.add(Calendar.DAY_OF_MONTH, day); cal.set(Calendar.HOUR_OF_DAY, 23); cal.set(Calendar.MINUTE, 59); cal.set(Calendar.SECOND, 59); date = cal.getTime(); return date; } }