tmfactor

Time factors of arbitrary dates

Syntax

TFactors = tmfactor(Settle,Maturity)

Arguments

Settle

Settlement date. A vector of serial date numbers, date character vectors, or datetime arrays. Settle must be earlier than Maturity.

Maturity

Maturity date. A vector of serial date numbers, date character vectors, or datetime arrays.

Description

TFactors = tmfactor(Settle,Maturity) determines the time factors from a vector of Settlement dates to a vector of Maturity dates.

Examples

Find the TFactors for Settle and Maturity dates.

TFactors = tmfactor('1-Jan-2015','1-Jan-2016')
TFactors =

     2

Find the TFactors for Settle and Maturity dates using a datetime array.

TFactors = tmfactor(datetime('1-Jan-2015','Locale','en_US'),'1-Jan-2016')
TFactors =

     2

Introduced before R2006a