Examples of plusDays()


Examples of hirondelle.date4j.DateTime.plusDays()

    /**
     * What day is 90 days from today?
     */
    public static void whenIs90DaysFromToday () {
        DateTime today = DateTime.today( TimeZone.getDefault() );
        log( "90 days from today is : " + today.plusDays( 90 ).format( "YYYY-MM-DD" ) );
    }

    /**
     * What day is 3 months and 5 days from today?
     */
 
View Full Code Here

Examples of java.time.LocalDate.plusDays()

            if (dow != null) {
                date = date.with(nextOrSame(dow));
            }
        }
        if (timeEndOfDay) {
            date = date.plusDays(1);
        }
        LocalDateTime localDT = LocalDateTime.of(date, time);
        LocalDateTime transition = timeDefinition.createDateTime(localDT, standardOffset, offsetBefore);
        return new ZoneOffsetTransition(transition, offsetBefore, offsetAfter);
    }
View Full Code Here

Examples of org.joda.time.DateMidnight.plusDays()

    }

    public void testMaximumValue() {
        DateMidnight dt = new DateMidnight(1570, 1, 1, GJChronology.getInstance());
        while (dt.getYear() < 1590) {
            dt = dt.plusDays(1);
            YearMonthDay ymd = dt.toYearMonthDay();
            assertEquals(dt.year().getMaximumValue(), ymd.year().getMaximumValue());
            assertEquals(dt.monthOfYear().getMaximumValue(), ymd.monthOfYear().getMaximumValue());
            assertEquals(dt.dayOfMonth().getMaximumValue(), ymd.dayOfMonth().getMaximumValue());
        }
View Full Code Here

Examples of org.joda.time.DateMidnight.plusDays()

    }

    public void testMaximumValue() {
        DateMidnight dt = new DateMidnight(1570, 1, 1);
        while (dt.getYear() < 1590) {
            dt = dt.plusDays(1);
            YearMonthDay ymd = dt.toYearMonthDay();
            assertEquals(dt.year().getMaximumValue(), ymd.year().getMaximumValue());
            assertEquals(dt.monthOfYear().getMaximumValue(), ymd.monthOfYear().getMaximumValue());
            assertEquals(dt.dayOfMonth().getMaximumValue(), ymd.dayOfMonth().getMaximumValue());
        }
View Full Code Here

Examples of org.joda.time.DateTime.plusDays()

                for (int x = 0; x < visibleDays; x++) {
                    g.setClip(new Rectangle2D.Double(x * dayWidth, 0,
                            dayWidth, columnHeaderHeight));
                    g.drawString(fmt.print(tempDateTime),
                            xTextOffset + x * dayWidth, yHeaderTextOffset);
                    tempDateTime = tempDateTime.plusDays(1);
                }
                g.setClip(oldClip);
            }
        };

View Full Code Here

Examples of org.joda.time.DateTime.plusDays()

          - start.getMillis());

      for (int j = 0; j < 1; j++) {
        for (int i = 0; i < duration.days() + 1; i++) {
          DateTime calendar = start;
          calendar = calendar.plusDays(i).withHourOfDay(
              6 + random.nextInt(10));

          Event event = new Event();
          int id = (int) (j * duration.days() + i);
          event.setId("" + id);
View Full Code Here

Examples of org.joda.time.DateTime.plusDays()

    }

    private void setOffsetDays(int startOffset, int endOffset) {
        setCaption(DEFAULT_CAPTION);
        DateTime today = getValue() != null ? new DateTime(getValue().getTime())  : new DateTime();
        Date end = today.plusDays(startOffset).toDate();
        Date start = today.minusDays(endOffset).toDate();
        setValue(today.toDate());
        setDateFormat("yyyy-MM-dd");
        setRangeStart(start);
        setRangeEnd(end);
View Full Code Here

Examples of org.joda.time.DateTime.plusDays()

                    timeZoneOffset = STANDARD_OFFSET;
                }
            }
            if (hour == "24") {
                adjustedHour = "00";
                dateTime = dateTime.plusDays(1);
            }

            dateTime = dateTime.withHourOfDay(Integer.valueOf(adjustedHour)).withZoneRetainFields(
                    DateTimeZone.forID(timeZoneOffset));
            result = isoFormat.print(dateTime);
View Full Code Here

Examples of org.joda.time.DateTime.plusDays()

        final DateTime today = clockService.now().toDateTimeAtStartOfDay();
       
        if(dueBy.isBefore(today)) {
            return DateRange.OverDue;
        }
        if(dueBy.isBefore(today.plusDays(1))) {
            return DateRange.Today;
        }
        if(dueBy.isBefore(today.plusDays(2))) {
            return DateRange.Tomorrow;
        }
View Full Code Here

Examples of org.joda.time.DateTime.plusDays()

            return DateRange.OverDue;
        }
        if(dueBy.isBefore(today.plusDays(1))) {
            return DateRange.Today;
        }
        if(dueBy.isBefore(today.plusDays(2))) {
            return DateRange.Tomorrow;
        }
        if(dueBy.isBefore(today.plusDays(7))) {
            return DateRange.ThisWeek;
        }
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.