%% Determine the Number of Days Between Two Dates Based on a 360-Day Year
% Determine the NumDays using date character vectors for StartDate and EndDate.

NumDays = days360('15-jan-2000', '15-mar-2000')

%
% Determine the NumDays using a datetime array for StartDate.

NumDays = days360(datetime('15-jan-2000','Locale','en_US'), '15-mar-2000')

%
% Determine the NumDays using a vector for EndDate.

MoreDays = ['15-mar-2000'; '15-apr-2000'; '15-jun-2000'];
NumDays = days360('15-jan-2000', MoreDays)

% Copyright 2012 The MathWorks, Inc.