@Test public void dateHasTime_shouldReturnTrueOnlyInDateHasTime() { Assert.assertFalse(EmrUtils.dateHasTime(TestUtils.date(2012, 1, 1))); Assert.assertTrue(EmrUtils.dateHasTime(TestUtils.date(2012, 1, 1, 10, 0, 0))); Assert.assertTrue(EmrUtils.dateHasTime(TestUtils.date(2012, 1, 1, 0, 10, 0))); Assert.assertTrue(EmrUtils.dateHasTime(TestUtils.date(2012, 1, 1, 0, 0, 10))); }
public static boolean dateHasTime(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date); return cal.get(Calendar.HOUR) != 0 || cal.get(Calendar.MINUTE) != 0 || cal.get(Calendar.SECOND) != 0 || cal.get(Calendar.MILLISECOND) != 0; }
EmrUtils { public static boolean dateHasTime(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date); return cal.get(Calendar.HOUR) != 0 || cal.get(Calendar.MINUTE) != 0 || cal.get(Calendar.SECOND) != 0 || cal.get(Calendar.MILLISECOND) != 0; } }
EmrUtils { public static boolean dateHasTime(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date); return cal.get(Calendar.HOUR) != 0 || cal.get(Calendar.MINUTE) != 0 || cal.get(Calendar.SECOND) != 0 || cal.get(Calendar.MILLISECOND) != 0; }  }
EmrUtils { public static boolean dateHasTime(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date); return cal.get(Calendar.HOUR) != 0 || cal.get(Calendar.MINUTE) != 0 || cal.get(Calendar.SECOND) != 0 || cal.get(Calendar.MILLISECOND) != 0; }  static boolean dateHasTime(Date date); static boolean isToday(Date date); static Integer whoStage(Concept c); static List<String> parseCsv(String csv); static List<Concept> parseConcepts(String csv); static Provider getProvider(User user); }
EmrUtils { public static boolean dateHasTime(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date); return cal.get(Calendar.HOUR) != 0 || cal.get(Calendar.MINUTE) != 0 || cal.get(Calendar.SECOND) != 0 || cal.get(Calendar.MILLISECOND) != 0; }  static boolean dateHasTime(Date date); static boolean isToday(Date date); static Integer whoStage(Concept c); static List<String> parseCsv(String csv); static List<Concept> parseConcepts(String csv); static Provider getProvider(User user);  }