Java Date Add dateAddDays(Date date, int days)

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

Description

date Add Days

License

Apache License

Declaration

public static Date dateAddDays(Date date, int days) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {
    private static long DAY_IN_MILLISECOND = 0x5265c00L;

    public static Date dateAddDays(Date date, int days) {
        long now = date.getTime() + (long) days * DAY_IN_MILLISECOND;
        return new Date(now);
    }/*from w w  w  .  j ava 2s  .  c  o  m*/
}

Related

  1. DateAdd(String strDate, int iCount, int iType)
  2. DateAdd3Days(String _date)
  3. dateAddDay(Date date, int day)
  4. DateAddDays(Date _date, int days)
  5. dateAddDays(Date date, int days)
  6. dateAddDays(Date time, int days, String dateFormat)
  7. dateAddHours(Date time, int hours, SimpleDateFormat dateFormat)
  8. dateAddMinutes(Date date, int minutes)
  9. dateAddMM(Date date, int i)