Java Day Add addDay(Date date, int day)

Here you can find the source of addDay(Date date, int day)

Description

add Day

License

Open Source License

Parameter

Parameter Description
date a parameter
day a parameter

Return

Date

Declaration

public static Date addDay(Date date, int day) 

Method Source Code

//package com.java2s;

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

public class Main {
    /**/*from   w  ww .  j  ava  2  s  .co  m*/
     * @param date
     * @param day
     * @return Date
     */
    public static Date addDay(Date date, int day) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);
        cal.add(Calendar.DATE, day);
        return cal.getTime();
    }
}

Related

  1. addDate(Date date, int day)
  2. addDate(java.util.Date date, int day)
  3. addDate(String date, SimpleDateFormat format, int dayCnt)
  4. addDate(String str, int field, int dayNum)
  5. addDay(Date d, int amount)
  6. addDay(Date date, int day)
  7. addDay(Date date, int dayAmount)
  8. addDay(Date date, int days)
  9. addDay(Date date, int n)