Package com.imsl.finance
Interface BasisPart
public interface BasisPart
Component of
DayCountBasis. The day count basis consists of a
month basis and a yearly basis. Each of these components implements this
interface.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintdaysBetween(GregorianCalendar date1, GregorianCalendar date2) Returns the number of days fromdate1todate2.doubledaysInPeriod(GregorianCalendar date, int frequency) Returns the number of days in a coupon period.intReturns the number of days in the year.intgetDaysInYear(GregorianCalendar settlement, GregorianCalendar maturity) Deprecated.
-
Method Details
-
daysBetween
Returns the number of days fromdate1todate2.- Parameters:
date1- aGregorianCalendarwhich specifies the initial datedate2- aGregorianCalendarwhich specifies the final date- Returns:
- an
intindicating the number of days fromdate1todate2.
-
getDaysInYear
Returns the number of days in the year.- Parameters:
date- aGregorianCalendardate.- Returns:
- an
intwhich specifies the number of days in the year
-
getDaysInYear
Deprecated.UsegetDaysInYear(GregorianCalendar)instead.Returns the number of days in the year.- Parameters:
settlement- aGregorianCalendardate which specifies the settlement datematurity- aGregorianCalendardate which specifies the maturity date- Returns:
- an
intwhich specifies the number of days in the year
-
daysInPeriod
Returns the number of days in a coupon period.- Parameters:
date- aGregorianCalendarwhich specifies the final date of the coupon periodfrequency- anintcontaining the number of coupon periods per year. This is typically 1, 2 or 4.- Returns:
- an
intwhich specifies the number of days in the coupon period
-
getDaysInYear(GregorianCalendar)instead.