Example usage for org.joda.time LocalDate plusWeeks

List of usage examples for org.joda.time LocalDate plusWeeks

Introduction

In this page you can find the example usage for org.joda.time LocalDate plusWeeks.

Prototype

public LocalDate plusWeeks(int weeks) 

Source Link

Document

Returns a copy of this date plus the specified number of weeks.

Usage

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);
        }
    };
}