@Test public void testIsWeekdayMonday() { Calendar cal = Calendar.getInstance(); cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); Assert.assertTrue(sut.isWeekday(cal.getTime())); }
public boolean isWeekday(final Date inDate) { Calendar date = Calendar.getInstance(); date.setTime(inDate); return date.get(Calendar.DAY_OF_WEEK) != Calendar.SATURDAY && date.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY; }
DayOfWeekStrategy { public boolean isWeekday(final Date inDate) { Calendar date = Calendar.getInstance(); date.setTime(inDate); return date.get(Calendar.DAY_OF_WEEK) != Calendar.SATURDAY && date.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY; } }
DayOfWeekStrategy { public boolean isWeekday(final Date inDate) { Calendar date = Calendar.getInstance(); date.setTime(inDate); return date.get(Calendar.DAY_OF_WEEK) != Calendar.SATURDAY && date.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY; }  }
DayOfWeekStrategy { public boolean isWeekday(final Date inDate) { Calendar date = Calendar.getInstance(); date.setTime(inDate); return date.get(Calendar.DAY_OF_WEEK) != Calendar.SATURDAY && date.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY; }  boolean isWeekday(final Date inDate); }
DayOfWeekStrategy { public boolean isWeekday(final Date inDate) { Calendar date = Calendar.getInstance(); date.setTime(inDate); return date.get(Calendar.DAY_OF_WEEK) != Calendar.SATURDAY && date.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY; }  boolean isWeekday(final Date inDate);  }