List of usage examples for org.joda.time LocalDate plusWeeks
public LocalDate plusWeeks(int weeks)
From source file:org.squashtest.tm.domain.planning.StandardWorkloadCalendar.java
License:Open Source License
private LocalDate skipWeekendToMonday(LocalDate date) { if (isWeekend(date)) { return date.plusWeeks(1).withDayOfWeek(DateTimeConstants.MONDAY); } else {/*from ww w . ja v a2 s . c om*/ return date; } }
From source file:org.zkoss.ganttz.timetracker.zoom.DetailFourTimeTrackerState.java
License:Open Source License
@Override protected Iterator<LocalDate> getPeriodsSecondLevelGenerator(LocalDate start) { return new LazyGenerator<LocalDate>(start) { @Override/* w w w .j a va2 s .co m*/ protected LocalDate next(LocalDate last) { return last.getDayOfWeek() != 1 ? last.plusDays(getDaysUntilFirstDayNextWeek(last)) : last.plusWeeks(1); } }; }