Package org.joda.time

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


  @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

        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

        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

        do {
          fixed = fixed.plusDays(direction);
        } while (fixed.getDayOfWeek() != day);
      } else if (rf.getDays() != null) {
        // if number of days set -> move number of days
        fixed = fixed.plusDays(rf.getWhen() == When.BEFORE ? -rf.getDays() : rf.getDays());
      }
      HolidayType type = xmlUtil.getType(rf.getLocalizedType());
      holidays.add(new Holiday(fixed, rf.getDescriptionPropertiesKey(), type));
    }
  }
View Full Code Here

        break;
      case EASTER_SATURDAY:
        easterSunday = easterSunday.minusDays(1);
        break;
      case EASTER_MONDAY:
        easterSunday = easterSunday.plusDays(1);
        break;
      case EASTER_TUESDAY:
        easterSunday = easterSunday.plusDays(2);
        break;
      case GENERAL_PRAYER_DAY:
View Full Code Here

        break;
      case EASTER_MONDAY:
        easterSunday = easterSunday.plusDays(1);
        break;
      case EASTER_TUESDAY:
        easterSunday = easterSunday.plusDays(2);
        break;
      case GENERAL_PRAYER_DAY:
        easterSunday = easterSunday.plusDays(26);
        break;
      case ASCENSION_DAY:
View Full Code Here

        break;
      case EASTER_TUESDAY:
        easterSunday = easterSunday.plusDays(2);
        break;
      case GENERAL_PRAYER_DAY:
        easterSunday = easterSunday.plusDays(26);
        break;
      case ASCENSION_DAY:
        easterSunday = easterSunday.plusDays(39);
        break;
      case PENTECOST:
View Full Code Here

        break;
      case GENERAL_PRAYER_DAY:
        easterSunday = easterSunday.plusDays(26);
        break;
      case ASCENSION_DAY:
        easterSunday = easterSunday.plusDays(39);
        break;
      case PENTECOST:
      case WHIT_SUNDAY:
        easterSunday = easterSunday.plusDays(49);
        break;
View Full Code Here

      case ASCENSION_DAY:
        easterSunday = easterSunday.plusDays(39);
        break;
      case PENTECOST:
      case WHIT_SUNDAY:
        easterSunday = easterSunday.plusDays(49);
        break;
      case WHIT_MONDAY:
      case PENTECOST_MONDAY:
        easterSunday = easterSunday.plusDays(50);
        break;
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.