Class DayCountConvention_ACT

    • Constructor Detail

      • DayCountConvention_ACT

        public DayCountConvention_ACT()
        Create an ACT day count convention.
    • Method Detail

      • getDaycount

        public double getDaycount​(LocalDate startDate,
                                  LocalDate endDate)
        Description copied from interface: DayCountConvention
        Return the number of days between startDate and endDate given the specific daycount convention.
        Specified by:
        getDaycount in interface DayCountConvention
        Parameters:
        startDate - The start date given as a LocalDate.
        endDate - The end date given as a LocalDate.
        Returns:
        The number of days within the given period.
      • daysBetween

        public static double daysBetween​(LocalDate startDate,
                                         LocalDate endDate)
        Returns the number of days, between two dates. A fractional day is rounded to the approximately nearest day. The formula implemented is (endDate.toEpochDay() - startDate.toEpochDay());
        Parameters:
        startDate - The start date of the interval.
        endDate - The end date of the interval.
        Returns:
        Number of days between startDate and endDate.