Package org.joda.time

Examples of org.joda.time.YearMonthDay.plusDays()


            case WEEKLY:

                if (!StringUtils.isEmpty(getWeeklyViewUrl())) {
                    nextUrl =
                            getRequest().getContextPath() + getWeeklyViewUrl() + "&" + getFirstDayParameter() + "="
                                    + firstDay.plusDays(Lesson.NUMBER_OF_DAYS_IN_WEEK).toString("ddMMyyyy");
                    beforeUrl =
                            getRequest().getContextPath() + getWeeklyViewUrl() + "&" + getFirstDayParameter() + "="
                                    + firstDay.minusDays(Lesson.NUMBER_OF_DAYS_IN_WEEK).toString("ddMMyyyy");
                    builder.append(
                            "<tr><td class=\"tcalendarlinks\"></td><td colspan=\"7\" class=\"acenter tcalendarlinks\"> <span class=\"smalltxt\"><a href=\"")
View Full Code Here


            case DAILY:

                if (!StringUtils.isEmpty(getDailyViewUrl())) {
                    nextUrl =
                            getRequest().getContextPath() + getDailyViewUrl() + "&amp;" + getFirstDayParameter() + "="
                                    + firstDay.plusDays(1).toString("ddMMyyyy");
                    beforeUrl =
                            getRequest().getContextPath() + getDailyViewUrl() + "&amp;" + getFirstDayParameter() + "="
                                    + firstDay.minusDays(1).toString("ddMMyyyy");
                    builder.append(
                            "<tr><td class=\"tcalendarlinks\"></td><td class=\"acenter tcalendarlinks\"><span class=\"smalltxt\"><a href=\"")
View Full Code Here

    private YearMonthDay getValidBeginDate(YearMonthDay startDate) {
        YearMonthDay lessonBegin =
                startDate.toDateTimeAtMidnight().withDayOfWeek(getDiaSemana().getDiaSemanaInDayOfWeekJodaFormat())
                        .toYearMonthDay();
        if (lessonBegin.isBefore(startDate)) {
            lessonBegin = lessonBegin.plusDays(NUMBER_OF_DAYS_IN_WEEK);
        }
        return lessonBegin;
    }

    private YearMonthDay getValidEndDate(YearMonthDay endDate) {
View Full Code Here

            YearMonthDay firstDayOfMonth = new YearMonthDay(yearNumber, monthNumber, 1);
            YearMonthDay monday = firstDayOfMonth.toDateTimeAtMidnight().withDayOfWeek(MONDAY_IN_JODA_TIME).toYearMonthDay();

            if ((monday.getMonthOfYear() < monthNumber) || (monday.getYear() < yearNumber)) {
                monday = monday.plusDays(Lesson.NUMBER_OF_DAYS_IN_WEEK);
            }

            while (monday.getMonthOfYear() == monthNumber) {
                result.add(monday);
                monday = monday.plusDays(Lesson.NUMBER_OF_DAYS_IN_WEEK);
View Full Code Here

                monday = monday.plusDays(Lesson.NUMBER_OF_DAYS_IN_WEEK);
            }

            while (monday.getMonthOfYear() == monthNumber) {
                result.add(monday);
                monday = monday.plusDays(Lesson.NUMBER_OF_DAYS_IN_WEEK);
            }
        }

        return result;
    }
View Full Code Here

            setYear(new Partial(DateTimeFieldType.year(), day.getYear()));
            setMonth(new Partial(DateTimeFieldType.monthOfYear(), day.getMonthOfYear()));

            YearMonthDay monday = day.toDateTimeAtMidnight().withDayOfWeek(MONDAY_IN_JODA_TIME).toYearMonthDay();
            if ((monday.getMonthOfYear() < day.getMonthOfYear()) || (monday.getYear() < day.getYear())) {
                monday = monday.plusDays(Lesson.NUMBER_OF_DAYS_IN_WEEK);
            }

            setDay(monday);
        }
    }
View Full Code Here

    @Atomic
    public static void run(final SortedSet<NextPossibleSummaryLessonsAndDatesBean> set) {
        final NextPossibleSummaryLessonsAndDatesBean last = set.last();
        final Lesson lesson = last.getLesson();
        final YearMonthDay date = last.getDate();
        lesson.refreshPeriodAndInstancesInSummaryCreation(lesson.isBiWeeklyOffset() ? date.plusDays(8) : date.plusDays(1));
        for (final NextPossibleSummaryLessonsAndDatesBean n : set) {
            run(n.getLesson(), n.getDate());
        }
    }
}
View Full Code Here

    @Atomic
    public static void run(final SortedSet<NextPossibleSummaryLessonsAndDatesBean> set) {
        final NextPossibleSummaryLessonsAndDatesBean last = set.last();
        final Lesson lesson = last.getLesson();
        final YearMonthDay date = last.getDate();
        lesson.refreshPeriodAndInstancesInSummaryCreation(lesson.isBiWeeklyOffset() ? date.plusDays(8) : date.plusDays(1));
        for (final NextPossibleSummaryLessonsAndDatesBean n : set) {
            run(n.getLesson(), n.getDate());
        }
    }
}
View Full Code Here

    private static YearMonthDay getBeginDateInSpecificWeekDay(DiaSemana diaSemana, YearMonthDay begin) {
        if (diaSemana != null) {
            YearMonthDay newBegin =
                    begin.toDateTimeAtMidnight().withDayOfWeek(diaSemana.getDiaSemanaInDayOfWeekJodaFormat()).toYearMonthDay();
            if (newBegin.isBefore(begin)) {
                begin = newBegin.plusDays(Lesson.NUMBER_OF_DAYS_IN_WEEK);
            } else {
                begin = newBegin;
            }
        }
        return begin;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.