Examples of withDayOfMonth()


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

                    for (Interval interval : event.getGanttDiagramEventSortedIntervals()) {

                        toWrite = null;
                        toMark = true;
                        LocalDate localDate = yearMonthDay.withDayOfMonth(dayOfMonth).toLocalDate();
                        if ((event.getGanttDiagramEventDayType(interval) == DayType.SPECIFIC_DAYS)
                                || (event.getGanttDiagramEventDayType(interval) == DayType.WORKDAY)) {
                            if ((localDate.getDayOfWeek() == SATURDAY_IN_JODA_TIME)
                                    || (localDate.getDayOfWeek() == SUNDAY_IN_JODA_TIME) || (Holiday.isHoliday(localDate))) {
                                toMark = false;
View Full Code Here

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

                    if (!isEventToMarkWeekendsAndHolidays) {
                        builder.append("</div></td>");
                    } else if (!specialDiv) {
                        builder.append("<td class=\"tdnomark\">");
                        if (dayOfMonth <= yearMonthDay.plusMonths(1).minusDays(1).getDayOfMonth()) {
                            LocalDate localDate = yearMonthDay.withDayOfMonth(dayOfMonth).toLocalDate();
                            if (Holiday.isHoliday(localDate)) {
                                builder.append(F);
                            } else if (localDate.getDayOfWeek() == SATURDAY_IN_JODA_TIME) {
                                builder.append("S");
                            } else if (localDate.getDayOfWeek() == SUNDAY_IN_JODA_TIME) {
View Full Code Here

Examples of org.threeten.bp.LocalDateTime.withDayOfMonth()

        map.put(2L, "2nd");
        map.put(3L, "3rd");
        builder.appendText(DAY_OF_MONTH, map);
        DateTimeFormatter f = builder.toFormatter();
        LocalDateTime dt = LocalDateTime.of(2010, 1, 1, 0, 0);
        assertEquals(f.format(dt.withDayOfMonth(1)), "1st");
        assertEquals(f.format(dt.withDayOfMonth(2)), "2nd");
        assertEquals(f.format(dt.withDayOfMonth(3)), "3rd");
    }

    @Test
View Full Code Here

Examples of org.threeten.bp.LocalDateTime.withDayOfMonth()

        map.put(3L, "3rd");
        builder.appendText(DAY_OF_MONTH, map);
        DateTimeFormatter f = builder.toFormatter();
        LocalDateTime dt = LocalDateTime.of(2010, 1, 1, 0, 0);
        assertEquals(f.format(dt.withDayOfMonth(1)), "1st");
        assertEquals(f.format(dt.withDayOfMonth(2)), "2nd");
        assertEquals(f.format(dt.withDayOfMonth(3)), "3rd");
    }

    @Test
    public void test_appendTextMapIncomplete() throws Exception {
View Full Code Here

Examples of org.threeten.bp.LocalDateTime.withDayOfMonth()

        builder.appendText(DAY_OF_MONTH, map);
        DateTimeFormatter f = builder.toFormatter();
        LocalDateTime dt = LocalDateTime.of(2010, 1, 1, 0, 0);
        assertEquals(f.format(dt.withDayOfMonth(1)), "1st");
        assertEquals(f.format(dt.withDayOfMonth(2)), "2nd");
        assertEquals(f.format(dt.withDayOfMonth(3)), "3rd");
    }

    @Test
    public void test_appendTextMapIncomplete() throws Exception {
        Map<Long, String> map = new HashMap<Long, String>();
View Full Code Here

Examples of org.threeten.bp.MonthDay.withDayOfMonth()

    }

    @Test
    public void test_withDayOfMonth_noChangeEqual() {
        MonthDay test = MonthDay.of(6, 30);
        assertEquals(test.withDayOfMonth(30), test);
    }

    @Test(expectedExceptions=DateTimeException.class)
    public void test_withDayOfMonth_tooLow() {
        MonthDay.of(6, 30).withDayOfMonth(0);
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.