Like Damanjit said, use the Calendar's add() method.
I'm pasting clips from an example where I was adding a month
Calendar cal = Calendar.getInstance();
cal.add( Calendar.MONTH, 1 );
Date date = cal.getTime();
From
Calendar API they show subtraction of 5 days:
add
public abstract void add(int field,
int amount)Date Arithmetic function. Adds the specified (signed) amount of time to the given time field, based on the calendar's rules. For example, to subtract 5 days from the current time of the calendar, you can achieve it by calling:
add(Calendar.DATE, -5).
Parameters:
field - the time field.
amount - the amount of date or time to be added to the field.
If you need to start with a particular Date object, Calendar has a method, setTime(Date date) .
[ March 29, 2005: Message edited by: Carol Enderlin ]