DateAdd -- compute the difference between two dates
import java.util.Date;
/**
* DateAdd -- compute the difference between two dates.
*/
publicclass DateAdd {
publicstaticvoid main(String[] av) {
//+
/** Today's date */
Date now = new Date();
long t = now.getTime();
t -= 700 * 24 * 60 * 60 * 1000;
Date then = new Date(t);
System.out.println("Seven hundred days ago was " + then);
//-
}
}