Documentation of 'net.finmath.time.daycount.DayCountConvention_ACT' Java class
DayCountConvention_ACT
net.finmath.time.daycount

Class DayCountConvention_ACT

    • Constructor Summary

      Constructors 
      Constructor and Description
      DayCountConvention_ACT()
      Create an ACT day count convention.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static double daysBetween(java.util.Calendar startDate, java.util.Calendar endDate)
      Returns the number of days, between two Calendar dates.
      double getDaycount(java.util.Calendar startDate, java.util.Calendar endDate)
      Return the number of days between startDate and endDate given the specific daycount convention.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DayCountConvention_ACT

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

      • getDaycount

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

        public static double daysBetween(java.util.Calendar startDate,
                                         java.util.Calendar endDate)
        Returns the number of days, between two Calendar dates. The method is only exact, if the two calendar dates are (approximately) on the same time. A fractional day is rounded to the approximately nearest day (since daylight saving is not considered, the notion of nearest may be off by one hour). The formula implemented is Math.round( ((double)(endDate.getTimeInMillis()-startDate.getTimeInMillis())) / 1000.0 / 60.0 / 60.0 / 24)

        For more accurate calculation consider org.joda.time.Days.

        However, the method is correct if each calendar is on the same time and they differ only by days.

        Parameters:
        startDate - The start date of the interval.
        endDate - The end date of the interval.
        Returns:
        Number of days between startDate and endDate.

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.