Java Date After getAfterEndDate(Integer day)

Here you can find the source of getAfterEndDate(Integer day)

Description

get After End Date

License

Open Source License

Declaration

public static Date getAfterEndDate(Integer day) 

Method Source Code

//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;
    }
}

Related

  1. daysAfter(Date dateInst, int numDays)
  2. getAfter(Date comparedDate, int cursor, String unit)
  3. getAfterDay(Date date, int afterDays)
  4. getAfterDay(Date date, Integer day)
  5. getAfterDayNumber(Date endDate, Date startDate)
  6. getAfterMin(Date date, int min)
  7. getDateAfter(Date d, int day)
  8. getDateAfter(Date date, int days)
  9. getDateAfter(Date date, int increment)