java.lang.Object
net.finmath.time.daycount.DayCountConvention_ACT
- All Implemented Interfaces:
DayCountConvention
- Direct Known Subclasses:
DayCountConvention_ACT_360
,DayCountConvention_ACT_365
,DayCountConvention_ACT_365A
,DayCountConvention_ACT_365L
,DayCountConvention_ACT_ACT_AFB
,DayCountConvention_ACT_ACT_ICMA
,DayCountConvention_ACT_ACT_ISDA
,DayCountConvention_ACT_ACT_YEARFRAC
Base class which calculates the day count by calculating the actual number of days between startDate and endDate.
A fractional day is rounded to the approximately nearest day.
- Version:
- 1.0
- Author:
- Christian Fries
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic double
daysBetween(LocalDate startDate, LocalDate endDate)
Returns the number of days, between two dates.double
getDaycount(LocalDate startDate, LocalDate endDate)
Return the number of days between startDate and endDate given the specific daycount convention.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.finmath.time.daycount.DayCountConvention
getDaycountFraction
-
Constructor Details
-
DayCountConvention_ACT
public DayCountConvention_ACT()Create an ACT day count convention.
-
-
Method Details
-
getDaycount
Description copied from interface:DayCountConvention
Return the number of days between startDate and endDate given the specific daycount convention.- Specified by:
getDaycount
in interfaceDayCountConvention
- Parameters:
startDate
- The start date given as aLocalDate
.endDate
- The end date given as aLocalDate
.- Returns:
- The number of days within the given period.
-
daysBetween
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.
-