Java Date After getAfterDay(Date date, Integer day)

Here you can find the source of getAfterDay(Date date, Integer day)

Description

get After Day

License

Open Source License

Declaration

public static Date getAfterDay(Date date, Integer day) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Calendar;
import java.util.Date;

public class Main {

    public static Date getAfterDay(Date date, Integer day) {
        if (null == date) {
            return null;
        }/*  www .ja  v  a2 s  . co m*/
        if (null == day) {
            return date;
        } else {
            Calendar now = Calendar.getInstance();
            now.setTime(date);
            now.set(Calendar.DATE, now.get(Calendar.DATE) + day);
            return now.getTime();
        }
    }
}

Related

  1. dateAfter(Date origDate, int amount, int timeUnit)
  2. dateAfterNMonths(Date dt, int n)
  3. daysAfter(Date dateInst, int numDays)
  4. getAfter(Date comparedDate, int cursor, String unit)
  5. getAfterDay(Date date, int afterDays)
  6. getAfterDayNumber(Date endDate, Date startDate)
  7. getAfterEndDate(Integer day)
  8. getAfterMin(Date date, int min)
  9. getDateAfter(Date d, int day)