Java Date After dateAfter(Date origDate, int amount, int timeUnit)

Here you can find the source of dateAfter(Date origDate, int amount, int timeUnit)

Description

date After

License

Open Source License

Declaration

public static final Date dateAfter(Date origDate, int amount, int timeUnit) 

Method Source Code

//package com.java2s;

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

public class Main {

    public static final Date dateAfter(Date origDate, int amount, int timeUnit) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(origDate);// w  w  w  . j  a v a2 s.com
        calendar.add(timeUnit, amount);
        return calendar.getTime();
    }
}

Related

  1. after(Date point, Date when)
  2. afterDay(final Date date1, final Date date2)
  3. afterMonth(Date dateTime)
  4. afterOneDay(Date depdt)
  5. dateAfter(Date date, int years, int months)
  6. dateAfterNMonths(Date dt, int n)
  7. daysAfter(Date dateInst, int numDays)
  8. getAfter(Date comparedDate, int cursor, String unit)
  9. getAfterDay(Date date, int afterDays)