Examples of toDateTimeAtStartOfDay()


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

    @Test
    @Transactional
    public void taskWithViolatedDeadlineHasCorrectDeadlineViolationStatus() {
        task.setDeadline(new LocalDate());
        LocalDate tomorrow = new LocalDate().plusDays(1);
        task.setEndDate(tomorrow.toDateTimeAtStartOfDay().toDate());
        assertTrue(task.getDeadlineViolationStatus() ==
                TaskDeadlineViolationStatusEnum.DEADLINE_VIOLATED);
    }

    @Test
View Full Code Here

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

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

    @Test
View Full Code Here

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

    public void initLastConsolidatedDate() {
        // init the lastConsolidatedDate
        LocalDate consolidatedUntil = (task.getConsolidation() == null) ? null
                : task.getConsolidation().getConsolidatedUntil();
        AdvanceConsolidationDTO.lastConsolidatedDate = (consolidatedUntil == null) ? null
                : consolidatedUntil.toDateTimeAtStartOfDay().toDate();
    }

    private void initLastConsolidatedAndSavedDate() {
        // init the lastConsolidatedAndSaveDate
        int i = 0;
View Full Code Here

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

            start = getThursdayOfThisWeek(start);
            finish = getThursdayOfThisWeek(finish);
        }

        timeGeometry.setMin(start.toDateTimeAtStartOfDay().toDate());
        timeGeometry.setMax(finish.toDateTimeAtStartOfDay().toDate());
        timeGeometry.setAxisLabelsPlacement("bottom");
        // Remove year separators
        timeGeometry.setGridColor("#FFFFFF");

        return timeGeometry;
View Full Code Here

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

        Hbox dateHbox = new Hbox();
        dateHbox.appendChild(new Label(_("Select date")));

        LocalDate initialDateForIndicatorValues =
                earnedValueChartFiller.initialDateForIndicatorValues();
        this.earnedValueChartLegendDatebox = new Datebox(initialDateForIndicatorValues
                .toDateTimeAtStartOfDay().toDate());
        this.earnedValueChartLegendDatebox.setConstraint(
                dateMustBeInsideVisualizationArea(earnedValueChartFiller));
        dateHbox.appendChild(this.earnedValueChartLegendDatebox);
View Full Code Here

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

    @Override
    public Date getCurrentStartDate() {
        CalendarData calendarData = getCurrentVersion();
        if (calendarData != null) {
            LocalDate startDate = getValidFrom(calendarData);
            return startDate != null ? startDate.toDateTimeAtStartOfDay()
                    .toDate() : null;
        }
        return null;
    }
View Full Code Here

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

    }

    private Date plusDays(Date today, int days) {
        LocalDate result = LocalDate.fromDateFields(today)
                .plusDays(days);
        return result.toDateTimeAtStartOfDay().toDate();
    }

    private TaskMilestone createValidTaskMilestone() {
        TaskMilestone result = TaskMilestone.create(new Date());
        return result;
View Full Code Here

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

    protected static class DateFormatter implements ValueFormatter {
        @Override
        public String format(Object value, ValueType valueType, FormatContext formatCtx) throws InterruptedException {
            LocalDate date = (LocalDate)value;
            return date.toDateTimeAtStartOfDay(DateTimeZone.UTC).toString() + "/DAY";
        }
    }

    protected static class DateTimeFormatter implements ValueFormatter {
        @Override
View Full Code Here

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

                            // TODO This daft catch is required my MySQL, which also requires the TimeZone offset to be
                            // "undone"
                            final LocalDate localDate = (LocalDate) value;
                            final int millisOffset = -DateTimeZone.getDefault().getOffset(null);
                            final Date javaDate =
                                localDate.toDateTimeAtStartOfDay(DateTimeZone.forOffsetMillis(millisOffset)).toDate();

                            statement.setObject(i, javaDate, java.sql.Types.DATE);
                        }
                    } else {
                        statement.setObject(i, value);
View Full Code Here

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

            setCellValueForDate(cell, dateValue, dateCellStyle);
            return true;
        }
        if(valueAsObj instanceof LocalDate) {
            LocalDate value = (LocalDate) valueAsObj;
            Date date = value.toDateTimeAtStartOfDay().toDate();
            setCellValueForDate(cell, date, dateCellStyle);
            return true;
        }
        if(valueAsObj instanceof LocalDateTime) {
            LocalDateTime value = (LocalDateTime) valueAsObj;
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.