java.lang.Object
net.finmath.time.daycount.DayCountConvention_NL_365
- All Implemented Interfaces:
Serializable,DayCountConvention
public class DayCountConvention_NL_365 extends Object implements DayCountConvention, Serializable
Implementation of NL/365.
Calculates the day count by calculating the actual number of days between startDate (excluding) and endDate (including), excluding a leap day (February 29th) if present.
A fractional day is rounded to the approximately nearest day.
The day count fraction is calculated using NL/365 convention, that is, the
day count is divided by 365.
- Version:
- 1.0
- Author:
- Christian Fries
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description DayCountConvention_NL_365()Create an NL/365 day count convention. -
Method Summary
Modifier and Type Method Description doublegetDaycount(LocalDate startDate, LocalDate endDate)Return the number of days between startDate and endDate given the specific daycount convention.doublegetDaycountFraction(LocalDate startDate, LocalDate endDate)Return the daycount fraction corresponding to the period from startDate to endDate given the specific daycount convention.
-
Constructor Details
-
DayCountConvention_NL_365
public DayCountConvention_NL_365()Create an NL/365 day count convention.
-
-
Method Details
-
getDaycount
Description copied from interface:DayCountConventionReturn the number of days between startDate and endDate given the specific daycount convention.- Specified by:
getDaycountin 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.
-
getDaycountFraction
Description copied from interface:DayCountConventionReturn the daycount fraction corresponding to the period from startDate to endDate given the specific daycount convention.- Specified by:
getDaycountFractionin interfaceDayCountConvention- Parameters:
startDate- The start date given as aLocalDate.endDate- The end date given as aLocalDate.- Returns:
- The daycount fraction corresponding to the given period.
-