public class LocalDateCalculator extends AbstractDateCalculator<org.joda.time.LocalDate>
DAYS_IN_WEEK| Constructor and Description |
|---|
LocalDateCalculator() |
LocalDateCalculator(String name,
org.joda.time.LocalDate startDate,
HolidayCalendar<org.joda.time.LocalDate> holidayCalendar,
HolidayHandler<org.joda.time.LocalDate> holidayHandler) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkBoundary(org.joda.time.LocalDate date)
This may throw an
IndexOutOfBoundsException if the date is not within the
boundaries. |
protected org.joda.time.LocalDate |
clone(org.joda.time.LocalDate date) |
protected org.joda.time.LocalDate |
compareDate(org.joda.time.LocalDate date1,
org.joda.time.LocalDate date2,
boolean returnEarliest) |
protected DateCalculator<org.joda.time.LocalDate> |
createNewCalculator(String name,
org.joda.time.LocalDate startDate,
HolidayCalendar<org.joda.time.LocalDate> holidays,
HolidayHandler<org.joda.time.LocalDate> handler) |
int |
getNumberOfBusinessDaysBetween(org.joda.time.LocalDate d1,
org.joda.time.LocalDate d2)
Number of non weekend, non holidays days between d1 and d2, using the Holiday Handler type to match
what the method moveByBusinessDays requires.
|
protected org.joda.time.LocalDate |
getToday() |
boolean |
isWeekend(org.joda.time.LocalDate date)
is the date a non-working day according to the WorkingWeek?
|
DateCalculator<org.joda.time.LocalDate> |
moveByDays(int days)
This changes the current business date held in the calculator, it moves
the new current business date by the number of days and, if it falls on a
weekend or holiday, moves it further according to the HolidayHandler
given in this DateCalculator.
|
DateCalculator<org.joda.time.LocalDate> |
moveByMonths(int months) |
DateCalculator<org.joda.time.LocalDate> |
setWorkingWeek(WorkingWeek week)
Set the working week.
|
applyTenor, calculateTenorDates, calculateTenorDates, combine, forceCurrentDateNoAdjustment, getCurrentBusinessDate, getCurrentIncrement, getHolidayCalendar, getHolidayHandler, getHolidayHandlerType, getName, getStartDate, isCurrentDateNonWorking, isNonWorkingDay, moveByBusinessDays, moveByTenor, moveByTenor, moveToSpotDate, setCurrentBusinessDate, setCurrentIncrement, setHolidayCalendar, setHolidayHandler, setName, setStartDatepublic LocalDateCalculator()
public LocalDateCalculator(String name, org.joda.time.LocalDate startDate, HolidayCalendar<org.joda.time.LocalDate> holidayCalendar, HolidayHandler<org.joda.time.LocalDate> holidayHandler)
public DateCalculator<org.joda.time.LocalDate> setWorkingWeek(WorkingWeek week)
week - the JodaWorkingWeekIllegalArgumentException - if the week is not a JodaWorkingWeek.public boolean isWeekend(org.joda.time.LocalDate date)
public DateCalculator<org.joda.time.LocalDate> moveByDays(int days)
DateCalculatordays - number of days (can be <0 or >0)public DateCalculator<org.joda.time.LocalDate> moveByMonths(int months)
moveByMonths in class AbstractDateCalculator<org.joda.time.LocalDate>protected DateCalculator<org.joda.time.LocalDate> createNewCalculator(String name, org.joda.time.LocalDate startDate, HolidayCalendar<org.joda.time.LocalDate> holidays, HolidayHandler<org.joda.time.LocalDate> handler)
createNewCalculator in class AbstractDateCalculator<org.joda.time.LocalDate>protected org.joda.time.LocalDate getToday()
getToday in class AbstractDateCalculator<org.joda.time.LocalDate>protected org.joda.time.LocalDate compareDate(org.joda.time.LocalDate date1,
org.joda.time.LocalDate date2,
boolean returnEarliest)
compareDate in class AbstractDateCalculator<org.joda.time.LocalDate>protected void checkBoundary(org.joda.time.LocalDate date)
AbstractDateCalculatorIndexOutOfBoundsException if the date is not within the
boundaries.checkBoundary in class AbstractDateCalculator<org.joda.time.LocalDate>protected org.joda.time.LocalDate clone(org.joda.time.LocalDate date)
clone in class AbstractDateCalculator<org.joda.time.LocalDate>public int getNumberOfBusinessDaysBetween(org.joda.time.LocalDate d1,
org.joda.time.LocalDate d2)
DateCalculatord1 - start dated2 - end dateCopyright © 2006–2022 Appendium - Portfolio Financing Platform. All rights reserved.