%% Find Time Factors of Settle and Maturity Dates
% Find the TFactors for Settle and Maturity dates.

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

% Find the TFactors for Settle and Maturity dates using a datetimes.

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

% Copyright 2020 The MathWorks, Inc.