- 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
public abstract class DayCountConvention_ACT extends Object implements DayCountConvention
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 Constructor Description DayCountConvention_ACT()
Create an ACT day count convention.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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
-
-
-
-
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 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
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.
-
-