public static ValueDate convertDate(Date x,Calendar calendar){
  if (calendar == null) {
    throw DbException.getInvalidValueException("calendar",null);
  }
  Calendar cal=(Calendar)calendar.clone();
  cal.setTimeInMillis(x.getTime());
  long dateValue=dateValueFromCalendar(cal);
  return ValueDate.fromDateValue(dateValue);
}

public static ValueDate convertDate ( Date x , Calendar calendar ) { if ( calendar == null ) { throw DbException . getInvalidValueException ( "calendar" , null ) ; } Calendar cal = ( Calendar ) calendar . clone ( ) ; cal . setTimeInMillis ( x . getTime ( ) ) ; long dateValue = dateValueFromCalendar ( cal ) ; return ValueDate . fromDateValue ( dateValue ) ; }
convert a java . util . date using the specified calendar .
