Examples of toDateTimeAtStartOfDay()


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

            public Date getDeadline() {
                LocalDate deadline = taskElement.getDeadline();
                if (deadline == null) {
                    return null;
                }
                return deadline.toDateTimeAtStartOfDay().toDate();
            }

            @Override
            public void setDeadline(Date date) {
                if (date != null) {
View Full Code Here

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

            XYModel xymodel = new SimpleXYModel();
            String title = "hours";

            LocalDate previousDate = allocation.getStartDate();
            BigDecimal previousPercentage = BigDecimal.ZERO;
            xymodel.addValue(title, previousDate.toDateTimeAtStartOfDay()
                    .getMillis(), 0);

            for (Stretch stretch : stretches) {
                BigDecimal amountWork = stretch.getAmountWorkPercentage()
                        .subtract(previousPercentage).multiply(taskHours);
View Full Code Here

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

                }

                xymodel.addValue(title, previousDate.toDateTimeAtStartOfDay()
                        .getMillis(), hoursPerDay);
                if (days > 0) {
                    xymodel.addValue(title, endDate.toDateTimeAtStartOfDay()
                            .getMillis() - 1, hoursPerDay);
                }

                previousDate = endDate;
                previousPercentage = stretch.getAmountWorkPercentage();
View Full Code Here

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

                            value = value.setScale(2).divide(maxValue,
                                    RoundingMode.DOWN);
                        }
                        LocalDate date = advanceMeasurement.getDate();
                        if ((value != null) && (date != null)) {
                            xymodel.addValue(title, Long.valueOf(date
                                    .toDateTimeAtStartOfDay().getMillis()),
                                    value);
                        }
                    }
                }
View Full Code Here

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

    }

    public void calculateProjectDates(OrderTemplate template) {
        LocalDate initLocalDate = new LocalDate()
                .plusDays(template.getStartAsDaysFromBeginning());
        Date initDate = initLocalDate.toDateTimeAtStartOfDay().toDate();
        getOrder().setInitDate(initDate);
        this.initDate.setValue(initDate);

        if (template.getDeadlineAsDaysFromBeginning() != null ) {
            LocalDate deadlineLocalDate = initLocalDate.plusDays(template
View Full Code Here

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

        this.initDate.setValue(initDate);

        if (template.getDeadlineAsDaysFromBeginning() != null ) {
            LocalDate deadlineLocalDate = initLocalDate.plusDays(template
                    .getDeadlineAsDaysFromBeginning());
            Date deadline = deadlineLocalDate.toDateTimeAtStartOfDay().toDate();
            getOrder().setDeadline(deadline);
            this.deadline.setValue(deadline);
        } else {
            getOrder().setDeadline(null);
            this.deadline.setValue(null);
View Full Code Here

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

                    .getValidFrom(version);
            if (dateValidFrom != null) {
                Util.bind(datebox, new Util.Getter<Date>() {
                    @Override
                    public Date get() {
                        return dateValidFrom.toDateTimeAtStartOfDay().toDate();
                    }
                });
                datebox.setDisabled(false);
            } else {
                datebox.setDisabled(true);
View Full Code Here

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

    @Transactional
    public void theoreticalHoursWithADateWithinStartAndEndDateHead() {
        prepareTaskForTheoreticalAdvanceTesting();
        LocalDate limit = task.getStartAsLocalDate().plusDays(1);
        EffortDuration expected = EffortDuration.hours(8);
        assertThat(task.getTheoreticalCompletedTimeUntilDate(limit.toDateTimeAtStartOfDay().toDate()),
                equalTo(expected));
    }

    @Test
    @Transactional
View Full Code Here

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

    @Transactional
    public void theoreticalHoursWithADateWithinStartAndEndDateTail() {
        prepareTaskForTheoreticalAdvanceTesting();
        LocalDate limit = task.getEndAsLocalDate().minusDays(1);
        EffortDuration expected = EffortDuration.hours(32);
        assertThat(task.getTheoreticalCompletedTimeUntilDate(limit.toDateTimeAtStartOfDay().toDate()),
                equalTo(expected));
    }

    @Test
    @Transactional
View Full Code Here

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

    @Test
    @Transactional
    public void theoreticalPercentageWithADateWithinStartAndEndDateHead() {
        prepareTaskForTheoreticalAdvanceTesting();
        LocalDate limit = task.getStartAsLocalDate().plusDays(1);
        assertThat(task.getTheoreticalAdvancePercentageUntilDate(limit.toDateTimeAtStartOfDay().toDate()),
                equalTo(new BigDecimal("0.20000000")));
    }

    @Test
    @Transactional
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.