Package org.joda.time

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


                SpecificResourceAllocation allocation =
                    SpecificResourceAllocation.create(task);
                allocation.setResource(createValidWorker());
                LocalDate start = task.getStartAsLocalDate();
                task.setIntraDayEndDate(IntraDayDate.startOfDay(start
                        .plusDays(3)));
                allocation.onIntervalWithinTask(start, start.plusDays(3))
                        .allocateHours(24);
                assertTrue(allocation.getAssignedHours() > 0);
View Full Code Here


                    SpecificResourceAllocation.create(task);
                allocation.setResource(createValidWorker());
                LocalDate start = task.getStartAsLocalDate();
                task.setIntraDayEndDate(IntraDayDate.startOfDay(start
                        .plusDays(3)));
                allocation.onIntervalWithinTask(start, start.plusDays(3))
                        .allocateHours(24);
                assertTrue(allocation.getAssignedHours() > 0);

                task.addResourceAllocation(allocation);
                taskElementDAO.save(taskGroup);
View Full Code Here

        query.setParameter(this.startDate, startDate);
        query.setParameter(this.startTime, start.toLocalTime());
       
        query.setParameter(this.endDate, endDate);
        query.setParameter(this.endTime, end.toLocalTime());
        query.setParameter(this.endPlusOneDate, endDate.plusDays(1));
       
        query.setParameter(this.intervalParameter, interval);
       
        //Need set to handle duplicate results from join
        return new LinkedHashSet<T>(query.getResultList());
View Full Code Here

        query.setParameter(this.startDate, startDate);
        query.setParameter(this.startTime, start.toLocalTime());

        query.setParameter(this.endDate, endDate);
        query.setParameter(this.endTime, end.toLocalTime());
        query.setParameter(this.endPlusOneDate, endDate.plusDays(1));

        query.setParameter(this.intervalParameter, interval);

        final Set<AggregatedGroupMapping> groups = ImmutableSet.<AggregatedGroupMapping>builder().add(aggregatedGroupMapping).add(aggregatedGroupMappings).build();
        query.setParameter(this.aggregatedGroupsParameter, groups);
View Full Code Here

        query.setParameter(this.startDate, startDate);
        query.setParameter(this.startTime, start.toLocalTime());
       
        query.setParameter(this.endDate, endDate);
        query.setParameter(this.endTime, end.toLocalTime());
        query.setParameter(this.endPlusOneDate, endDate.plusDays(1));

        // Get the first key to use for the interval
        K key = keys.iterator().next();
        query.setParameter(this.intervalParameter, key.getInterval());
       
View Full Code Here

        query.setParameter(this.startDate, startDate);
        query.setParameter(this.startTime, start.toLocalTime());
       
        query.setParameter(this.endDate, endDate);
        query.setParameter(this.endTime, end.toLocalTime());
        query.setParameter(this.endPlusOneDate, endDate.plusDays(1));

        query.setParameter(this.intervalParameter, interval);
       
        final Set<AggregatedGroupMapping> groups = ImmutableSet.<AggregatedGroupMapping>builder().add(aggregatedGroupMapping).add(aggregatedGroupMappings).build();
        query.setParameter(this.aggregatedGroupsParameter, groups);
View Full Code Here

        return toDoItems.newToDo(description, category, subcategory, user, dueBy, cost);
    }

    private static LocalDate daysFromToday(final int i) {
        final LocalDate date = new LocalDate(Clock.getTimeAsDateTime());
        return date.plusDays(i);
    }

   
    // //////////////////////////////////////
View Full Code Here

                continue;
            }
            LocalDate statuteGrantorStartDate = new LocalDate(enrolmentPeriod.getStartDateDateTime().toLocalDate());
            statuteGrantorStartDate = statuteGrantorStartDate.minusWeeks(howSoon);
            LocalDate statuteGrantorStopDate = new LocalDate(enrolmentPeriod.getEndDateDateTime().toLocalDate());
            statuteGrantorStopDate = statuteGrantorStopDate.plusDays(1); //inc 1 so that today is compared as before or equal to enrolmentPeriod end date
            LocalDate today = new LocalDate();
            if (today.isAfter(statuteGrantorStartDate) && today.isBefore(statuteGrantorStopDate)) {

                if (enrolmentPeriod.getExecutionPeriod().isFirstOfYear()) {
                    switcherTermEnrolmentPeriods = fallTermEnrolmentPeriods;
View Full Code Here

    @Override
    public LocalDate getEndDate(final Event event) {
        final GratuityEvent gratuityEvent = (GratuityEvent) event;
        final LocalDate startDate = gratuityEvent.getRegistration().getStartDate().toLocalDate();

        return startDate.plusDays(getNumberOfDaysToStartApplyingPenalty());
    }

    @Override
    public void edit(InstallmentBean bean) {
        Integer numberOfDaysToStartApplyingPenalty = bean.getNumberOfDaysToStartApplyingPenalty();
View Full Code Here

        while (!current.isAfter(endDate)) {
            if (isWorkDay(current)) {
                result++;
            }

            current = current.plusDays(1);
        }

        return result;
    }
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.