public static Calendar createCalendarInstance(Date date){
  Calendar calendar=new GregorianCalendar();
  calendar.setTime(date);
  clearTimeOfDay(calendar);
  return calendar;
}

public static Calendar createCalendarInstance ( Date date ) { Calendar calendar = new GregorianCalendar ( ) ; calendar . setTime ( date ) ; clearTimeOfDay ( calendar ) ; return calendar ; }
returns an instance of a calendar without any time of day , with the given date .
