Examples of minusDays()


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

            totalIntended = totalIntended.minus(addDayAssignment(result,
                    dayAssignment));
        }

        // Generate rest of day assignments
        for (date = date.minusDays(1); totalIntended.compareTo(zero()) > 0; date = date
                .minusDays(1)) {
            EffortDuration duration = min(totalIntended, calendar.asDurationOn(
                    PartialDay.wholeDay(date), ONE_RESOURCE_PER_DAY));
            DayAssignment dayAssigment = createDayAssignment(
                    resourceAllocation, resource, date, duration);
View Full Code Here

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

            totalIntended = totalIntended.minus(addDayAssignment(result,
                    dayAssignment));
        }

        // Generate rest of day assignments
        for (date = date.minusDays(1); totalIntended.compareTo(zero()) > 0; date = date
                .minusDays(1)) {
            EffortDuration duration = min(totalIntended, calendar.asDurationOn(
                    PartialDay.wholeDay(date), ONE_RESOURCE_PER_DAY));
            DayAssignment dayAssigment = createDayAssignment(
                    resourceAllocation, resource, date, duration);
View Full Code Here

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

                Integer days = Days.daysBetween(previousDate, endDate)
                        .getDays();

                if (calendar != null) {
                    days -= calendar.getNonWorkableDays(previousDate,
                            endDate.minusDays(1)).size();
                }

                BigDecimal hoursPerDay = BigDecimal.ZERO;
                if (days > 0) {
                    hoursPerDay = amountWork.divide(new BigDecimal(days),
View Full Code Here

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

                            newEnd.getEffortDuration()), remainderDuration);
        }

        private LocalDate someWorkableDaysBefore(LocalDate end, int workableDays) {
            LocalDate result = end;
            for (int i = 0; i < workableDays; result = result.minusDays(1)) {
                if (isWorkable(result.minusDays(1))) {
                    i++;
                }
            }
            return result;
View Full Code Here

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

        }

        private LocalDate someWorkableDaysBefore(LocalDate end, int workableDays) {
            LocalDate result = end;
            for (int i = 0; i < workableDays; result = result.minusDays(1)) {
                if (isWorkable(result.minusDays(1))) {
                    i++;
                }
            }
            return result;
        }
View Full Code Here

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

                            min(decrement, date.getEffortDuration())));
            decrement = decrement
                    .minus(min(date.getEffortDuration(), decrement));
            LocalDate resultDay = date.getDate();
            while (!decrement.isZero()) {
                resultDay = resultDay.minusDays(1);
                EffortDuration capacity = calendar.getCapacityOn(PartialDay
                        .wholeDay(resultDay));
                result = IntraDayDate.create(resultDay,
                        capacity.minus(min(capacity, decrement)));
                decrement = decrement.minus(min(capacity, decrement));
View Full Code Here

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

        creatingNewVersion = false;
        Util.reloadBindings(createNewVersionWindow);

        setSelectedDay(startDate);
        if ((startDate == null) && (expiringDate != null)) {
            setSelectedDay(expiringDate.minusDays(1));
        }

        reloadCurrentWindow();
    }
View Full Code Here

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

            Util.bind(datebox, new Util.Getter<Date>() {
                @Override
                public Date get() {
                    LocalDate expiringDate = version.getExpiringDate();
                    if (expiringDate != null) {
                        return expiringDate.minusDays(1)
                                .toDateTimeAtStartOfDay().toDate();
                    }
                    return null;
                }
            }, new Util.Setter<Date>() {
View Full Code Here

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

                    if (dateValidFrom != null) {
                        goToDate(dateValidFrom.toDateTimeAtStartOfDay()
                                .toDate());
                    } else if (expiringDate != null) {
                        goToDate(expiringDate.minusDays(1)
                                .toDateTimeAtStartOfDay().toDate());
                    } else {
                        goToDate(new Date());
                    }
                }
View Full Code Here

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

    @Test
    @Transactional
    public void taskWithUnviolatedDeadlineHasCorrectDeadlineViolationStatusMargin() {
        LocalDate now = new LocalDate();
        task.setDeadline(now);
        task.setEndDate(now.minusDays(1).toDateTimeAtStartOfDay().toDate());
        assertTrue(task.getDeadlineViolationStatus() ==
                TaskDeadlineViolationStatusEnum.ON_SCHEDULE);
    }

    private void prepareTaskForTheoreticalAdvanceTesting() {
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.