Time and frequency from dates
[Times, F] = date2time(Settle, Dates,
Compounding, Basis,
EndMonthRule)
 Settlement date. A vector of serial date numbers or date strings. 
 Vector of dates corresponding to the compounding value. 
 (Optional) Scalar value representing the rate at which the input zero rates were compounded when annualized. This argument determines the formula for the discount factors:

 (Optional) Daycount basis of the instrument. A vector of integers.
For more information, see basis. 
 (Optional) Endofmonth rule. A vector. This rule applies
only when 
[Times, F] = date2time(Settle, Dates,
Compounding, Basis,
computes
time factors appropriate to compounded rate quotes beyond the settlement
date.
EndMonthRule)
Times
is a vector of time factors.
F
is a scalar of related compounding frequencies.
Note
To obtain accurate results from this function, the 
date2time
is the inverse of time2date
.