Examples of plusDays()


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

        assertRawIndexUpdated(startTime, startTime.plusDays(1), scheduleIds(100, 112));
        assertRawIndexUpdated(startTime.plusDays(1), startTime.plusDays(2), scheduleIds(100, 109));
        assertRawIndexUpdated(endTime.minusHours(1), endTime, scheduleIds(105, 123));
        assert1HourIndexUpdated(today, today.plusHours(6), scheduleIds(105, 123));
        assert6HourIndexUpdated(today, today.plusDays(1), scheduleIds(100, 125));
    }

    @Test
    public void replace412Index() throws Exception {
        System.setProperty("rhq.metrics.index.page-size", "5");
View Full Code Here

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

        populateRaw412Index(startTime, startTime.plusDays(1), scheduleIds(100, 112));
        populateRaw412Index(startTime.plusDays(1), startTime.plusDays(2), scheduleIds(100, 109));
        populateRaw412Index(endTime.minusHours(1), endTime, scheduleIds(105, 123));
        populate1Hour412Index(today, today.plusHours(6), scheduleIds(105, 123));
        populate6Hour412Index(today, today.plusDays(1), scheduleIds(100, 125));


        Cluster cluster = new Cluster.Builder()
            .addContactPoint("127.0.0.1")
            .withCredentials("rhqadmin", "rhqadmin")
View Full Code Here

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

        assertRawIndexUpdated(startTime, startTime.plusDays(1), scheduleIds(100, 112));
        assertRawIndexUpdated(startTime.plusDays(1), startTime.plusDays(2), scheduleIds(100, 109));
        assertRawIndexUpdated(endTime.minusHours(1), endTime, scheduleIds(105, 123));
        assert1HourIndexUpdated(today, today.plusHours(6), scheduleIds(105, 123));
        assert6HourIndexUpdated(today, today.plusDays(1), scheduleIds(100, 125));
    }

    private void populateRaw411Index(DateTime startTime, DateTime endTime, List<Integer> scheduleIds) {
        populate411Index("one_hour_metrics", startTime, endTime, Hours.ONE.toStandardDuration(), scheduleIds);
    }
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

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

            return DateRange.Today;
        }
        if(dueBy.isBefore(today.plusDays(2))) {
            return DateRange.Tomorrow;
        }
        if(dueBy.isBefore(today.plusDays(7))) {
            return DateRange.ThisWeek;
        }
        return DateRange.Later;
    }
    //endregion
View Full Code Here

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

  @Test
  public void getDataShouldNotReturnTheDataOutsideOfTheDates() throws Exception {
    LocalDate date = new LocalDate();
    writeData(date);
    Collection<T> data = accessor.getData(date.plusDays(1), date.plusDays(2));
    assertThat(data.size(), is(0));
  }

  @Test
  public void getDataShouldReturnAnEmptyCollectionIfNoData() {
View Full Code Here

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

  @Test
  public void getDataShouldNotReturnTheDataOutsideOfTheDates() throws Exception {
    LocalDate date = new LocalDate();
    writeData(date);
    Collection<T> data = accessor.getData(date.plusDays(1), date.plusDays(2));
    assertThat(data.size(), is(0));
  }

  @Test
  public void getDataShouldReturnAnEmptyCollectionIfNoData() {
View Full Code Here

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

        return toDoItems.newToDo(description, category, subcategory, user, dueBy, cost);
    }

    private static LocalDate daysFromToday(final int i) {
        final LocalDate date = new LocalDate(Clock.getTimeAsDateTime());
        return date.plusDays(i);
    }


    // //////////////////////////////////////
    // Injected services
View Full Code Here

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

        ISOChronology.getInstance());

    LocalDate firstTargetDate = new LocalDate(firstGregorianDate.toDateTimeAtStartOfDay().getMillis(), targetChrono);
    LocalDate lastTargetDate = new LocalDate(lastGregorianDate.toDateTimeAtStartOfDay().getMillis(), targetChrono);

    Interval interv = new Interval(firstTargetDate.toDateTimeAtStartOfDay(), lastTargetDate.plusDays(1)
        .toDateTimeAtStartOfDay());

    int targetYear = firstTargetDate.getYear();

    for (; targetYear <= lastTargetDate.getYear();) {
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.