@Test public void testConvertToSqlDate02() { Exception ex = assertThrows(IllegalArgumentException.class, () -> DateConvertUtils.convertToSqlDate(null)); assertThat(ex.getMessage(), is("date must not be null")); }
public static java.sql.Date convertToSqlDate(java.util.Date date) { assertArgs(date); Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); java.sql.Date sqlDate = new java.sql.Date(cal.getTimeInMillis()); return sqlDate; }
DateConvertUtils { public static java.sql.Date convertToSqlDate(java.util.Date date) { assertArgs(date); Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); java.sql.Date sqlDate = new java.sql.Date(cal.getTimeInMillis()); return sqlDate; } }
DateConvertUtils { public static java.sql.Date convertToSqlDate(java.util.Date date) { assertArgs(date); Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); java.sql.Date sqlDate = new java.sql.Date(cal.getTimeInMillis()); return sqlDate; } private  DateConvertUtils(); }
DateConvertUtils { public static java.sql.Date convertToSqlDate(java.util.Date date) { assertArgs(date); Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); java.sql.Date sqlDate = new java.sql.Date(cal.getTimeInMillis()); return sqlDate; } private  DateConvertUtils(); static Timestamp convertToTimestamp(java.util.Date date); static java.sql.Date convertToSqlDate(java.util.Date date); static Time convertToTime(java.util.Date date); }
DateConvertUtils { public static java.sql.Date convertToSqlDate(java.util.Date date) { assertArgs(date); Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); java.sql.Date sqlDate = new java.sql.Date(cal.getTimeInMillis()); return sqlDate; } private  DateConvertUtils(); static Timestamp convertToTimestamp(java.util.Date date); static java.sql.Date convertToSqlDate(java.util.Date date); static Time convertToTime(java.util.Date date);  }