@Test public void shouldTellIfDateIsWithInSubmissionWindow() throws Exception { Boolean is17ThWithin = Period.isWithinSubmissionWindow(DateTime.parse("2015-05-17")); assertFalse(is17ThWithin); Boolean is18ThWithin = Period.isWithinSubmissionWindow(DateTime.parse("2014-12-18")); assertTrue(is18ThWithin); Boolean is25ThWithin = Period.isWithinSubmissionWindow(DateTime.parse("2016-01-25")); assertTrue(is25ThWithin); Boolean is26ThWithin = Period.isWithinSubmissionWindow(DateTime.parse("2017-08-26")); assertFalse(is26ThWithin); }
public static boolean isWithinSubmissionWindow(DateTime date) { int day = date.dayOfMonth().get(); return day >= INVENTORY_BEGIN_DAY && day < INVENTORY_END_DAY_NEXT; }
Period implements Serializable { public static boolean isWithinSubmissionWindow(DateTime date) { int day = date.dayOfMonth().get(); return day >= INVENTORY_BEGIN_DAY && day < INVENTORY_END_DAY_NEXT; } }
Period implements Serializable { public static boolean isWithinSubmissionWindow(DateTime date) { int day = date.dayOfMonth().get(); return day >= INVENTORY_BEGIN_DAY && day < INVENTORY_END_DAY_NEXT; } Period(DateTime dateTime);  Period(DateTime begin, DateTime end); }
Period implements Serializable { public static boolean isWithinSubmissionWindow(DateTime date) { int day = date.dayOfMonth().get(); return day >= INVENTORY_BEGIN_DAY && day < INVENTORY_END_DAY_NEXT; } Period(DateTime dateTime);  Period(DateTime begin, DateTime end); static Period of(Date date); static Period generateForTraining(Date date); DateTime getBegin(); DateTime getInventoryBegin(); DateTime getInventoryEnd(); DateTime getEnd(); Period previous(); static boolean isWithinSubmissionWindow(DateTime date); String toString(); Period next(); Optional<Period> generateNextAvailablePeriod(); boolean isOpenToRequisitions(); DateTime getOpeningRequisitionDate(); @Override boolean equals(Object object); @Override int hashCode(); }
Period implements Serializable { public static boolean isWithinSubmissionWindow(DateTime date) { int day = date.dayOfMonth().get(); return day >= INVENTORY_BEGIN_DAY && day < INVENTORY_END_DAY_NEXT; } Period(DateTime dateTime);  Period(DateTime begin, DateTime end); static Period of(Date date); static Period generateForTraining(Date date); DateTime getBegin(); DateTime getInventoryBegin(); DateTime getInventoryEnd(); DateTime getEnd(); Period previous(); static boolean isWithinSubmissionWindow(DateTime date); String toString(); Period next(); Optional<Period> generateNextAvailablePeriod(); boolean isOpenToRequisitions(); DateTime getOpeningRequisitionDate(); @Override boolean equals(Object object); @Override int hashCode(); static final int BEGIN_DAY; static final int END_DAY; static final int INVENTORY_TRAINING_BEGIN_DAY; static final int INVENTORY_TRAINING_END_DAY_NEXT; static final int INVENTORY_BEGIN_DAY; static final int INVENTORY_END_DAY_NEXT; static final int DEFAULT_INVENTORY_DAY; }