// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class AddDays {
    public static void main(String[] args) throws ParseException {
        String s1 = "2011-09-23";
        DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
        System.out.println(s1);
        Date d1 = df.parse(s1);
        Calendar cal = new GregorianCalendar();
        cal.setTime(d1);
        cal.add(Calendar.DATE, -25);
        Date d2 = cal.getTime();
        String s2 = df.format(d2);
        System.out.println(s2);
    }
}
