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.
BusinessCalendar(holidayDates: SortedSet<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: SortedSet<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 |
|
operator fun plus(other: BusinessCalendar): BusinessCalendar |
|
open fun toString(): String |
val EMPTY: BusinessCalendar |
fun calculateDaysBetween(startDate: LocalDate, endDate: LocalDate, dcbYear: DayCountBasisYear, dcbDay: DayCountBasisDay): Int |
|
fun createGenericSchedule(startDate: LocalDate, period: Frequency, calendar: BusinessCalendar = EMPTY, 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 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. |
fun Any.contextLogger(): <ERROR CLASS>
When called from a companion object, returns the logger for the enclosing class. |