public 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.
@JvmField @NotNull public static BusinessCalendar EMPTY
public static net.corda.finance.contracts.BusinessCalendar.Companion Companion
public BusinessCalendar(@NotNull java.util.SortedSet<java.time.LocalDate> holidayDates)
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.
@NotNull public BusinessCalendar plus(@NotNull BusinessCalendar other)
public boolean equals(@Nullable java.lang.Object other)
public int hashCode()
public boolean isWorkingDay(@NotNull java.time.LocalDate date)
@NotNull public java.time.LocalDate applyRollConvention(@NotNull java.time.LocalDate testDate, @NotNull DateRollConvention dateRollConvention)
@NotNull public java.time.LocalDate moveBusinessDays(@NotNull java.time.LocalDate date, @NotNull DateRollDirection direction, int i)
Returns a date which is the inbound date plus/minus a given number of business days. TODO: Make more efficient if necessary
@NotNull public java.lang.String toString()
@NotNull public java.util.SortedSet<java.time.LocalDate> getHolidayDates()
@JvmStatic public static int calculateDaysBetween(@NotNull java.time.LocalDate startDate, @NotNull java.time.LocalDate endDate, @NotNull DayCountBasisYear dcbYear, @NotNull DayCountBasisDay dcbDay)
@JvmStatic @NotNull public static java.time.LocalDate parseDateFromString(@NotNull java.lang.String it)
Parses a date of the form YYYY-MM-DD, like 2016-01-10 for 10th Jan.
@JvmStatic @NotNull public static java.util.List<java.time.LocalDate> createGenericSchedule(@NotNull java.time.LocalDate startDate, @NotNull Frequency period, @NotNull BusinessCalendar calendar, @NotNull DateRollConvention dateRollConvention, int noOfAdditionalPeriods, @Nullable java.time.LocalDate endDate, @Nullable java.lang.Integer periodOffset)
Calculates an event schedule that moves events around to ensure they fall on working days.
@JvmStatic @NotNull public static java.time.LocalDate getOffsetDate(@NotNull java.time.LocalDate startDate, @NotNull Frequency period, int steps)
Calculates the date from @startDate moving forward 'steps' of time size 'period'. Does not apply calendar logic / roll conventions.