open class BusinessCalendar
A business calendar performs date calculations that take into account national holidays and weekends. This is a typical feature of financial contracts, in which a business may not want a payment event to fall on a day when no staff are around to handle problems.
class UnknownCalendar : FlowException |
BusinessCalendar(holidayDates: List<LocalDate>)
A business calendar performs date calculations that take into account national holidays and weekends. This is a typical feature of financial contracts, in which a business may not want a payment event to fall on a day when no staff are around to handle problems. |
val holidayDates: List<LocalDate> |
open fun applyRollConvention(testDate: LocalDate, dateRollConvention: DateRollConvention): LocalDate |
|
open fun equals(other: Any?): Boolean |
|
open fun hashCode(): Int |
|
open fun isWorkingDay(date: LocalDate): Boolean |
|
fun moveBusinessDays(date: LocalDate, direction: DateRollDirection, i: Int): LocalDate
Returns a date which is the inbound date plus/minus a given number of business days. TODO: Make more efficient if necessary |
val TEST_CALENDAR_DATA: Map<String, String> |
|
val calendars: List<String> |
fun calculateDaysBetween(startDate: LocalDate, endDate: LocalDate, dcbYear: DayCountBasisYear, dcbDay: DayCountBasisDay): Int |
|
fun createGenericSchedule(startDate: LocalDate, period: Frequency, calendar: BusinessCalendar = getInstance(), dateRollConvention: DateRollConvention = DateRollConvention.Following, noOfAdditionalPeriods: Int = Integer.MAX_VALUE, endDate: LocalDate? = null, periodOffset: Int? = null): List<LocalDate>
Calculates an event schedule that moves events around to ensure they fall on working days. |
|
fun getInstance(vararg calname: String): BusinessCalendar
Returns a business calendar that combines all the named holiday calendars into one list of holiday dates. |
|
fun getOffsetDate(startDate: LocalDate, period: Frequency, steps: Int = 1): LocalDate
Calculates the date from @startDate moving forward 'steps' of time size 'period'. Does not apply calendar logic / roll conventions. |
|
fun parseDateFromString(it: String): LocalDate
Parses a date of the form YYYY-MM-DD, like 2016-01-10 for 10th Jan. |