static public Timestamp addDays(Timestamp day,int offset){
  if (day == null)   day=new Timestamp(System.currentTimeMillis());
  GregorianCalendar cal=new GregorianCalendar();
  cal.setTime(day);
  cal.set(Calendar.HOUR_OF_DAY,0);
  cal.set(Calendar.MINUTE,0);
  cal.set(Calendar.SECOND,0);
  cal.set(Calendar.MILLISECOND,0);
  if (offset != 0)   cal.add(Calendar.DAY_OF_YEAR,offset);
  java.util.Date temp=cal.getTime();
  return new Timestamp(temp.getTime());
}

static public Timestamp addDays ( Timestamp day , int offset ) { if ( day == null ) day = new Timestamp ( System . currentTimeMillis ( ) ) ; GregorianCalendar cal = new GregorianCalendar ( ) ; cal . setTime ( day ) ; cal . set ( Calendar . HOUR_OF_DAY , 0 ) ; cal . set ( Calendar . MINUTE , 0 ) ; cal . set ( Calendar . SECOND , 0 ) ; cal . set ( Calendar . MILLISECOND , 0 ) ; if ( offset != 0 ) cal . add ( Calendar . DAY_OF_YEAR , offset ) ; java . util . Date temp = cal . getTime ( ) ; return new Timestamp ( temp . getTime ( ) ) ; }
return day + offset ( truncates )
