@Test public void check_dayOfWeek_shall_interpret_0_as_sunday() throws Exception { ZonedDateTime after = ZonedDateTime.of(2012, 4, 1, 0, 0, 0, 0, zoneId); ZonedDateTime expected = ZonedDateTime.of(2012, 4, 8, 0, 0, 0, 0, zoneId); assertTrue(new CronExpression("0 0 0 * * 0").nextTimeAfter(after).equals(expected)); expected = ZonedDateTime.of(2012, 4, 29, 0, 0, 0, 0, zoneId); assertTrue(new CronExpression("0 0 0 * * 0L").nextTimeAfter(after).equals(expected)); expected = ZonedDateTime.of(2012, 4, 8, 0, 0, 0, 0, zoneId); assertTrue(new CronExpression("0 0 0 * * 0#2").nextTimeAfter(after).equals(expected)); }
public ZonedDateTime nextTimeAfter(ZonedDateTime afterTime) { return nextTimeAfter(afterTime, afterTime.plusYears(4)); }
CronExpression { public ZonedDateTime nextTimeAfter(ZonedDateTime afterTime) { return nextTimeAfter(afterTime, afterTime.plusYears(4)); } }
CronExpression { public ZonedDateTime nextTimeAfter(ZonedDateTime afterTime) { return nextTimeAfter(afterTime, afterTime.plusYears(4)); } CronExpression(final String expr);  CronExpression(final String expr, final boolean withSeconds); }
CronExpression { public ZonedDateTime nextTimeAfter(ZonedDateTime afterTime) { return nextTimeAfter(afterTime, afterTime.plusYears(4)); } CronExpression(final String expr);  CronExpression(final String expr, final boolean withSeconds); static CronExpression create(final String expr); static CronExpression createWithoutSeconds(final String expr); ZonedDateTime nextTimeAfter(ZonedDateTime afterTime); LocalDateTime nextLocalDateTimeAfter(LocalDateTime dateTime); ZonedDateTime nextTimeAfter(ZonedDateTime afterTime, long durationInMillis); ZonedDateTime nextTimeAfter(ZonedDateTime afterTime, ZonedDateTime dateTimeBarrier); @Override String toString(); }
CronExpression { public ZonedDateTime nextTimeAfter(ZonedDateTime afterTime) { return nextTimeAfter(afterTime, afterTime.plusYears(4)); } CronExpression(final String expr);  CronExpression(final String expr, final boolean withSeconds); static CronExpression create(final String expr); static CronExpression createWithoutSeconds(final String expr); ZonedDateTime nextTimeAfter(ZonedDateTime afterTime); LocalDateTime nextLocalDateTimeAfter(LocalDateTime dateTime); ZonedDateTime nextTimeAfter(ZonedDateTime afterTime, long durationInMillis); ZonedDateTime nextTimeAfter(ZonedDateTime afterTime, ZonedDateTime dateTimeBarrier); @Override String toString();  }