Android Day Get getAfterDate(Date date, int days)

Here you can find the source of getAfterDate(Date date, int days)

Description

get After Date

Declaration

public static String getAfterDate(Date date, int days) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class Main {
    public static String getAfterDate(Date date, int days) {
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);/* w  w  w .  j ava  2 s . com*/
        calendar.set(Calendar.DAY_OF_YEAR,
                calendar.get(Calendar.DAY_OF_YEAR) + days);
        return df.format(calendar.getTime());
    }
}

Related

  1. getHashByDay(String date)
  2. getJulianDay(Calendar cal)
  3. getIntervalDays(String sd, String ed)
  4. isBirthday(Calendar cal)
  5. getBeforeDate(Date date, int days)
  6. fromJulianDay(double julianDay)
  7. getTimeNextDay(long lTimeMillis)
  8. getDaysTo(Date date)
  9. intDayToString(int day)