yearfrac
Fraction of year between dates
Description
returns a fraction, in years, based on the number of days between dates
YearFraction
= yearfrac(StartDate
,EndDate
,Basis
)StartDate
and EndDate
using the given
day-count Basis
.
The number of days in a year (365 or 366) is equal to the number of days in the
calendar year after the StartDate
. If
EndDate
is earlier than StartDate
,
YearFraction
is negative.
All specified arguments must be M
-by-NUMINST
conforming matrices or scalar arguments.