Package org.joda.time

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


    static public LocalDate addWorkDaysTo(final LocalDate date, final int workDays) {
        int current = workDays;
        LocalDate result = date;

        while (current > 0) {
            result = result.plusDays(1);

            if (isWorkDay(result)) {
                current--;
            }
        }
View Full Code Here


      periodEndDate = periodEndDate.dayOfMonth().withMaximumValue();
      break;
    }

        // interest posting always occurs on next day after the period end date.
        periodEndDate = periodEndDate.plusDays(1);

        return periodEndDate;
    }

    public Money calculateInterestForAllPostingPeriods(final MonetaryCurrency currency, final List<PostingPeriod> allPeriods,
View Full Code Here

                                upToInterestCalculationDate);
                        compoundingPeriods.add(compoundingPeriod);
                    }

                    // move periodStartDate forward to day after this period
                    periodStartDate = periodEndDate.plusDays(1);
                }
            break;
            // case WEEKLY:
            // break;
            // case BIWEEKLY:
View Full Code Here

        if (recur == null) { return null; }

        if (isValidRecurringDate(recur, seedDate, currentDate)) { return currentDate; }

        if (recur.getFrequency().equals(Recur.DAILY)) {
            currentDate = currentDate.plusDays(recur.getInterval());
        } else if (recur.getFrequency().equals(Recur.WEEKLY)) {
            currentDate = currentDate.plusWeeks(recur.getInterval());
        } else if (recur.getFrequency().equals(Recur.MONTHLY)) {
            currentDate = currentDate.plusMonths(recur.getInterval());
        } else if (recur.getFrequency().equals(Recur.YEARLY)) {
View Full Code Here

  public LocalDate plus(LocalDate date, int days) {
    LocalDate res = sameOrNext(date);

    for (int i = 0; i < days; i++) {
      res = res.plusDays(1);
      res = sameOrNext(res);
    }

    return res;
  }
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.