public interface BasisPart
DayCountBasis
. The day count basis consists of a
month basis and a yearly basis. Each of these components implements this
interface.DayCountBasis
Modifier and Type | Method and Description |
---|---|
int |
daysBetween(GregorianCalendar date1,
GregorianCalendar date2)
Returns the number of days from
date1 to date2 . |
double |
daysInPeriod(GregorianCalendar date,
int frequency)
Returns the number of days in a coupon period.
|
int |
getDaysInYear(GregorianCalendar date)
Returns the number of days in the year.
|
int |
getDaysInYear(GregorianCalendar settlement,
GregorianCalendar maturity)
Deprecated.
Use
BasisPart.getDaysInYear(GregorianCalendar) instead. |
int daysBetween(GregorianCalendar date1, GregorianCalendar date2)
date1
to date2
.date1
- a GregorianCalendar
which specifies the initial
datedate2
- a GregorianCalendar
which specifies the final
dateint
indicating the number of days from
date1
to date2
.int getDaysInYear(GregorianCalendar date)
date
- a GregorianCalendar
date.int
which specifies the number of days in the
yearint getDaysInYear(GregorianCalendar settlement, GregorianCalendar maturity)
BasisPart.getDaysInYear(GregorianCalendar)
instead.settlement
- a GregorianCalendar
date which specifies
the settlement datematurity
- a GregorianCalendar
date which specifies the
maturity dateint
which specifies the number of days in the
yeardouble daysInPeriod(GregorianCalendar date, int frequency)
date
- a GregorianCalendar
which specifies the final
date of the coupon periodfrequency
- an int
containing the number of coupon
periods per year. This is typically 1, 2 or 4.int
which specifies the number of days in the
coupon periodCopyright © 2020 Rogue Wave Software. All rights reserved.