Package org.threeten.bp

Examples of org.threeten.bp.LocalDate.minusDays()


      }
      date = date.plusDays(1);
    }
    LocalDate result = expiryDate.with(PREVIOUS_FRIDAY_ADJUSTER);
    while (!holidayCalendar.isWorkingDay(result)) {
      result = result.minusDays(1);
    }
    return result;
  }

  @Override
View Full Code Here


  private LocalDate adjustForSettlement(final LocalDate date, final Calendar holidayCalendar) { // Use ScheduleCalculator
    int days = 0;
    LocalDate result = date;
    while (days < WORKING_DAYS_TO_SETTLE) {
      result = result.minusDays(1);
      if (holidayCalendar.isWorkingDay(result)) {
        days++;
      }
    }
    return result;
View Full Code Here

    ArgumentChecker.notNull(today, "today");
    ArgumentChecker.notNull(holidayCalendar, "holiday calendar");

    LocalDate expiry = getExpiryMonth(n, today);
    while (!holidayCalendar.isWorkingDay(expiry)) {
      expiry = expiry.minusDays(1);
    }
    return expiry;
  }

  @Override
View Full Code Here

      expiry = getQuarterlyExpiry(n, today);
    } else {
      throw new IllegalArgumentException("Could not handle frequency type " + tenor);
    }
    while (!holidayCalendar.isWorkingDay(expiry)) {
      expiry = expiry.minusDays(1);
    }
    return expiry;
  }
}
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.