daysdif
Days between dates for any day-count basis
Description
returns
the number of days between dates NumDays
= daysdif(StartDate
,EndDate
)StartDate
and EndDate
.
The first date for StartDate
is not included
when determining the number of days between first and last date.
Any input argument can contain multiple values, but if so, the other inputs must contain the
same number of values or a single value that applies to all. For example, if
StartDate
is an n-row cell array of
character vectors , then EndDate
must be an
n-row cell array of character vectors or a single date
character vector. NumDays
is then an
N
-by-1
vector of numbers.
returns
the number of days between dates NumDays
= daysdif(___,Basis
)StartDate
and EndDate
using
the optional argument Basis
for day-count. The
first date for StartDate
is not included when
determining the number of days between first and last date.
Any input argument can contain multiple values, but if so, the other inputs must contain the
same number of values or a single value that applies to all. For example, if
StartDate
is an n-row datetime array,
then EndDate
must be an n-row datetime array
or a single datetime. NumDays
is then an
N
-by-1
vector of numbers.
Examples
Input Arguments
Output Arguments
References
[1] Stigum, Marcia L. and Franklin Robinson. Money Market and Bond Calculations. Richard D. Irwin, 1996, ISBN 1-55623-476-7