Package org.joda.time

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


        // Select start date
        } else if (index == 2) {
            final LocalDate selectedDay = new LocalDate(startAllocationDate.getValue());
            if (isAppropriative()) {
                LimitingResourceQueueElement beingEdited = getBeingEditedElement();
                if (selectedDay.compareTo(new LocalDate(beingEdited.getEarliestStartDateBecauseOfGantt())) < 0) {
                    throw new WrongValueException(startAllocationDate, _("Day is not valid"));
                }
                return new DateAndHour(selectedDay, 0);
            } else {
                DateAndHour allocationTime = getValidDayInGap(selectedDay, getSelectedGap());
View Full Code Here


        }
        if (end != null && end.equals(date)) {
            return endAllocationDate;
        }
        if ((start.compareTo(date) <= 0
                && (end == null || end.compareTo(date) >= 0))) {
            return new DateAndHour(date, 0);
        }

        return null;
    }
View Full Code Here

            LocalDate filterStartDate, LocalDate filterEndDate) {
        SortedMap<LocalDate, BigDecimal> result = new TreeMap<LocalDate, BigDecimal>();

        for (AdvanceMeasurement advanceMeasurement : advanceMeasurements) {
            LocalDate day = advanceMeasurement.getDate();
            if(((filterStartDate == null) || day.compareTo(filterStartDate) >= 0) &&
                    ((filterEndDate == null) || day.compareTo(filterEndDate) <= 0)) {
                BigDecimal cost = advanceMeasurement.getValue().setScale(2)
                        .multiply(new BigDecimal(totalHours))
                        .divide(new BigDecimal(100),
                                new MathContext(2, RoundingMode.HALF_UP));
View Full Code Here

        SortedMap<LocalDate, BigDecimal> result = new TreeMap<LocalDate, BigDecimal>();

        for (AdvanceMeasurement advanceMeasurement : advanceMeasurements) {
            LocalDate day = advanceMeasurement.getDate();
            if(((filterStartDate == null) || day.compareTo(filterStartDate) >= 0) &&
                    ((filterEndDate == null) || day.compareTo(filterEndDate) <= 0)) {
                BigDecimal cost = advanceMeasurement.getValue().setScale(2)
                        .multiply(new BigDecimal(totalHours))
                        .divide(new BigDecimal(100),
                                new MathContext(2, RoundingMode.HALF_UP));
                result.put(day, cost);
View Full Code Here

            return result;
        }

        for (DayAssignment dayAssignment : dayAssignments) {
            LocalDate day = dayAssignment.getDay();
            if(((filterStartDate == null) || day.compareTo(filterStartDate) >= 0) &&
                    ((filterEndDate == null) || day.compareTo(filterEndDate) <= 0)) {
                BigDecimal cost = new BigDecimal(dayAssignment.getHours());

                if (!result.containsKey(day)) {
                    result.put(day, BigDecimal.ZERO);
View Full Code Here

        }

        for (DayAssignment dayAssignment : dayAssignments) {
            LocalDate day = dayAssignment.getDay();
            if(((filterStartDate == null) || day.compareTo(filterStartDate) >= 0) &&
                    ((filterEndDate == null) || day.compareTo(filterEndDate) <= 0)) {
                BigDecimal cost = new BigDecimal(dayAssignment.getHours());

                if (!result.containsKey(day)) {
                    result.put(day, BigDecimal.ZERO);
                }
View Full Code Here

            if (!isReadOnlyAdvanceMeasurements()) {
                LocalDate consolidatedUntil = manageOrderElementAdvancesModel
                        .getLastConsolidatedMeasurementDate(measurement
                                .getAdvanceAssignment());
                if (consolidatedUntil != null) {
                    if (consolidatedUntil.compareTo(measurement.getDate()) >= 0) {
                        return _("Date is not valid, it must be later than the last progress consolidation");
                    }
                }
                if (manageOrderElementAdvancesModel.isAlreadyReportedProgressWith(value)) {
                    return _("Date is not valid, it must be later than the last progress reported to the customer");
View Full Code Here

                    .getWorkReportLines();
            if (workReportLines.size() > 0) {
                LocalDate workReportDate = LocalDate
                        .fromDateFields(workReportLines.iterator().next()
                                .getDate());
                if (workReportDate.compareTo(start) >= 0
                        && workReportDate.compareTo(end) <= 0) {
                    return workReport;
                }
            }
        }
View Full Code Here

            if (workReportLines.size() > 0) {
                LocalDate workReportDate = LocalDate
                        .fromDateFields(workReportLines.iterator().next()
                                .getDate());
                if (workReportDate.compareTo(start) >= 0
                        && workReportDate.compareTo(end) <= 0) {
                    return workReport;
                }
            }
        }
View Full Code Here

        LocalDate min = periodicity.getStart(workReportDate);
        LocalDate max = periodicity.getEnd(workReportDate);

        for (WorkReportLine line : workReportLines) {
            LocalDate date = LocalDate.fromDateFields(line.getDate());
            if ((date.compareTo(min) < 0) || (date.compareTo(max) > 0)) {
                return false;
            }
        }
        return true;
    }
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.