BusinessCalendar.Companion
Keywords: net.corda.finance.contracts.BusinessCalendar.Companion class
Date: 2023-09-18

net.corda.finance.contracts

## Class BusinessCalendar.Companion

- net.corda.finance.contracts.BusinessCalendar.Companion

- Enclosing class:
    BusinessCalendar

      public static class BusinessCalendar.Companion

- - ### Method Detail

    - #### calculateDaysBetween

          @JvmStatic
          public int calculateDaysBetween(@NotNull
                                                     java.time.LocalDate startDate,
                                                     @NotNull
                                                     java.time.LocalDate endDate,
                                                     @NotNull
                                                     DayCountBasisYear dcbYear,
                                                     @NotNull
                                                     DayCountBasisDay dcbDay)

    - #### parseDateFromString

          @JvmStatic
           @NotNull
          public 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.

    - #### createGenericSchedule

          @JvmStatic
           @NotNull
          public 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.

    - #### getOffsetDate

          @JvmStatic
           @NotNull
          public 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.