Java Date Add addDays(int count, Calendar timestamp)

Here you can find the source of addDays(int count, Calendar timestamp)

Description

Adds or subtracts the corresponding time field, does not perform any alignment.

License

Apache License

Parameter

Parameter Description
count The quantity to change, can be negative.
timestamp The calendar to modify.

Return

The timestamp parameter.

Declaration

public static Calendar addDays(int count, Calendar timestamp) 

Method Source Code

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

import java.util.*;

public class Main {
    /**/*w ww .  j  a  va2s .co m*/
     * Adds or subtracts the corresponding time field, does not
     * perform any alignment.
     * @param count The quantity to change, can be negative.
     * @param timestamp The calendar to modify.
     * @return The timestamp parameter.
     */
    public static Calendar addDays(int count, Calendar timestamp) {
        timestamp.add(Calendar.DATE, count);
        return timestamp;
    }
}

Related

  1. addDay(Date date, int days)
  2. addDays(Date date1, long days)
  3. addDays(Date dateToAdd, int numberOfDay)
  4. addDays(Date target, int days)
  5. addDays(Date when, int amount)
  6. addDaysToCurrentDate(Integer dayIncrement)
  7. addInteger(Date date, int dateType, int amount)
  8. addSeconds(Date date1, long secs)
  9. dateAdd(Date date, int days)