Java Date After getDateAfter(Date date, int increment)

Here you can find the source of getDateAfter(Date date, int increment)

Description

get Date After

License

Open Source License

Declaration

public static Date getDateAfter(Date date, int increment) 

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 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();
    }
}

Related

  1. getAfterDayNumber(Date endDate, Date startDate)
  2. getAfterEndDate(Integer day)
  3. getAfterMin(Date date, int min)
  4. getDateAfter(Date d, int day)
  5. getDateAfter(Date date, int days)
  6. getDateAfterAddition(Date date, int days)
  7. getDateAfterMonths(Date start, int months)
  8. getDateScopeAfterMonth(int year, int month)
  9. getDateTimeAfter(final Date _from, final int _time_type, final int _count)