Examples of toDateTimeAtMidnight()


Examples of org.joda.time.YearMonthDay.toDateTimeAtMidnight()

        // duration field did not match the monthOfYear duration field. This
        // caused an exception to be thrown when subtracting days.
        DateTime dt = new DateTime
            (1112306400000L, GJChronology.getInstance(DateTimeZone.forID("Europe/Berlin")));
        YearMonthDay ymd = dt.toYearMonthDay();
        while (ymd.toDateTimeAtMidnight().getDayOfWeek() != DateTimeConstants.MONDAY) {
            ymd = ymd.minus(Period.days(1));
        }
    }

    private void testAdd(String start, DurationFieldType type, int amt, String end) {
View Full Code Here

Examples of org.joda.time.YearMonthDay.toDateTimeAtMidnight()

        // duration field did not match the monthOfYear duration field. This
        // caused an exception to be thrown when subtracting days.
        DateTime dt = new DateTime
            (1112306400000L, GJChronology.getInstance(DateTimeZone.forID("Europe/Berlin")));
        YearMonthDay ymd = dt.toYearMonthDay();
        while (ymd.toDateTimeAtMidnight().getDayOfWeek() != DateTimeConstants.MONDAY) {
            ymd = ymd.minus(Period.days(1));
        }
    }

    private void testAdd(String start, DurationFieldType type, int amt, String end) {
View Full Code Here

Examples of org.joda.time.YearMonthDay.toDateTimeAtMidnight()

                break;

            case MONTHLY:

                if (!StringUtils.isEmpty(getMonthlyViewUrl())) {
                    DateTime month = firstDay.toDateTimeAtMidnight();
                    DateTime firstDayOfMonth = (month.getDayOfMonth() != 1) ? month.withDayOfMonth(1) : month;
                    DateTime lastDayOfMonth = firstDayOfMonth.plusMonths(1).minusDays(1);
                    int monthNumberOfDays = Days.daysBetween(firstDayOfMonth, lastDayOfMonth).getDays() + 1;
                    nextUrl =
                            getRequest().getContextPath() + getMonthlyViewUrl() + "&" + getFirstDayParameter() + "="
View Full Code Here

Examples of org.joda.time.YearMonthDay.toDateTimeAtMidnight()

                break;

            case YEAR_DAILY:

                if (!StringUtils.isEmpty(getMonthlyViewUrl())) {
                    DateTime month = firstDay.toDateTimeAtMidnight();
                    DateTime firstDayOfMonth = (month.getDayOfMonth() != 1) ? month.withDayOfMonth(1) : month;
                    DateTime lastDayOfMonth = firstDayOfMonth.plusMonths(1).minusDays(1);
                    int monthNumberOfDays = Days.daysBetween(firstDayOfMonth, lastDayOfMonth).getDays() + 1;
                    nextUrl =
                            getRequest().getContextPath() + getMonthlyViewUrl() + "&" + getFirstDayParameter() + "="
View Full Code Here

Examples of org.joda.time.YearMonthDay.toDateTimeAtMidnight()

        String grade = concluded ? process.getFinalGrade().getLocalizedName() : "n/a";
        if (concluded && registration != null && registration.isConcluded()) {
            grade +=
                    " "
                            + registration.getLastStudentCurricularPlan().getCycle(CycleType.THIRD_CYCLE)
                                    .getCurriculum(registrationConclusionDate.toDateTimeAtMidnight()).getAverage()
                                    .toPlainString();
        }
        row.setCell(grade);

        // Data de conclusão
View Full Code Here

Examples of org.joda.time.YearMonthDay.toDateTimeAtMidnight()

                YearMonthDay.fromDateFields(enrolmentPeriod.getStartDate()).minusDays(NUMBER_OF_DAYS_BEFORE_PERIOD_TO_WARN);
        YearMonthDay endWarnPeriod =
                YearMonthDay.fromDateFields(enrolmentPeriod.getEndDate()).plusDays(NUMBER_OF_DAYS_AFTER_PERIOD_TO_WARN);
        Date now = new Date();
        if (startWarnPeriod.toDateTimeAtMidnight().toDate().before(now)
                && endWarnPeriod.toDateTimeAtMidnight().toDate().after(now)) {
            return true;
        } else {
            return false;
        }
    }
View Full Code Here

Examples of org.joda.time.YearMonthDay.toDateTimeAtMidnight()

        final YearMonthDay endDateToSearch = getLessonEndDay();
        if (endDateToSearch == null) {
            return false;
        }
        final DateTime intervalStart = interval.getStart();
        if (intervalStart.isAfter(endDateToSearch.toDateTimeAtMidnight().plusDays(1))) {
            return false;
        }
        final DateTime intervalEnd = interval.getEnd();
        if (intervalEnd.isBefore(startDateToSearch.toDateTimeAtMidnight())) {
            return false;
View Full Code Here

Examples of org.joda.time.YearMonthDay.toDateTimeAtMidnight()

    public ExecutionSemester getStartExecutionPeriod() {
        ExecutionSemester result = null;

        final YearMonthDay startDate = getStartDateYearMonthDay();
        if (startDate != null) {
            result = ExecutionSemester.readByDateTime(startDate.toDateTimeAtMidnight());

            if (result == null) {
                result = ExecutionYear.readByDateTime(startDate.toDateTimeAtMidnight()).getFirstExecutionPeriod();
            }
        }
View Full Code Here

Examples of org.joda.time.YearMonthDay.toDateTimeAtMidnight()

        final YearMonthDay startDate = getStartDateYearMonthDay();
        if (startDate != null) {
            result = ExecutionSemester.readByDateTime(startDate.toDateTimeAtMidnight());

            if (result == null) {
                result = ExecutionYear.readByDateTime(startDate.toDateTimeAtMidnight()).getFirstExecutionPeriod();
            }
        }

        return result != null ? result : getFirstExecutionPeriod();
    }
View Full Code Here

Examples of org.joda.time.YearMonthDay.toDateTimeAtMidnight()

        final YearMonthDay weekStartYearMonthDay = YearMonthDay.fromCalendarFields(startDay);
        final YearMonthDay weekEndYearMonthDay = YearMonthDay.fromCalendarFields(endDay);

        final Interval search =
                new Interval(weekStartYearMonthDay.toDateTimeAtMidnight(), weekEndYearMonthDay.toDateTimeAtMidnight());

        for (final Occupation roomOccupation : room.getOccupationSet()) {

            if (roomOccupation instanceof WrittenEvaluationSpaceOccupation) {
                Collection<WrittenEvaluation> writtenEvaluations =
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.