Here you can find the source of addDays(Calendar calendar, int days)
Parameter | Description |
---|---|
calendar | The calendar to add the given amount of days to. |
days | The amount of days to be added to the given calendar. Negative values are also allowed, it will just go back in time. |
public static void addDays(Calendar calendar, int days)
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { /**// ww w .j av a 2s . co m * Add the given amount of days to the given calendar. The changes are reflected in the given * calendar. * @param calendar The calendar to add the given amount of days to. * @param days The amount of days to be added to the given calendar. Negative values are also * allowed, it will just go back in time. */ public static void addDays(Calendar calendar, int days) { calendar.add(Calendar.DATE, days); } }