/src/main/java/net/finmath/time/SchedulePrototype.java
case WEEKS : startDate = referenceDate.plusDays( maturity *7) ; endDate = startDate.plusDays( termination *7) ; break;case YEARS : startDate = referenceDate.plusYears( maturity) ; endDate = startDate.plusYears( termination) ; break;
case YEARS : startDate = referenceDate.plusYears ( maturity ) ; endDate = startDate.plusYears ( termination ) ; break;
return generateSchedule(referenceDate, maturity, termination, OffsetUnit.MONTHS); } public Schedule generateSchedule(final LocalDate referenceDate, final int maturity, final int termination, final OffsetUnit unit) { LocalDate startDate; LocalDate endDate; switch(unit) { <extra_id_0> case MONTHS : startDate = referenceDate.plusMonths(maturity); endDate = startDate.plusMonths(termination); break; case DAYS : startDate = referenceDate.plusDays(maturity); endDate = startDate.plusDays(termination); break; case WEEKS : startDate = referenceDate.plusDays(maturity *7); endDate = startDate.plusDays(termination *7); break; default : startDate = referenceDate.plusMonths(maturity); endDate = startDate.plusMonths(termination); break; } return generateSchedule(referenceDate, startDate, endDate);