Package org.joda.time

Examples of org.joda.time.LocalDate.plusMonths()


        return order;
    }

    private Date givenDeadLine(int months) {
        LocalDate date = new LocalDate();
        date.plusMonths(months);
        return date.toDateTimeAtStartOfDay().toDate();
    }

    public CustomerCommunication createValidCustomerCommunication() {
        Order order = createValidOrder("Order A");
View Full Code Here


        BaseCalendarModel.forceLoadBaseCalendar(resource.getCalendar());

        LocalDate activationDate = getActivationDate(user.getWorker());
        LocalDate currentDate = new LocalDate();
        return getPersonalTimesheets(user.getWorker(), activationDate,
                currentDate.plusMonths(1), getPersonalTimesheetsPeriodicity());
    }

    private List<PersonalTimesheetDTO> getPersonalTimesheets(Resource resource,
            LocalDate start, LocalDate end,
            PersonalTimesheetsPeriodicityEnum periodicity) {
View Full Code Here

                PeriodFrequencyType frequencyType = data.recurrenceFrequency();
                LocalDate startDate = data.validFrom();
                if (frequencyType.isMonthly()) {
                    startDate = startDate.withDayOfMonth(data.recurrenceOnDay());
                    if (startDate.isBefore(data.validFrom())) {
                        startDate = startDate.plusMonths(1);
                    }
                } else if (frequencyType.isYearly()) {
                    startDate = startDate.withDayOfMonth(data.recurrenceOnDay()).withMonthOfYear(data.recurrenceOnMonth());
                    if (startDate.isBefore(data.validFrom())) {
                        startDate = startDate.plusYears(1);
View Full Code Here

        if (recur.getFrequency().equals(Recur.DAILY)) {
            currentDate = currentDate.plusDays(recur.getInterval());
        } else if (recur.getFrequency().equals(Recur.WEEKLY)) {
            currentDate = currentDate.plusWeeks(recur.getInterval());
        } else if (recur.getFrequency().equals(Recur.MONTHLY)) {
            currentDate = currentDate.plusMonths(recur.getInterval());
        } else if (recur.getFrequency().equals(Recur.YEARLY)) {
            currentDate = currentDate.plusYears(recur.getInterval());
        }

        return getNextRecurringDate(recur, seedDate, currentDate);
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.