%% Determine the Number of Days Between Two Dates Given a Basis of 30/360 Based on European Convention
% Determine the NumDays using date character vectors for StartDate and EndDate for the month of January.

StartDate = '1-Jan-2002';
EndDate = '1-Feb-2002';
NumDays = days360e(StartDate, EndDate)

%
% Determine the NumDays in the month of January using a datetime array for StartDate.

NumDays = days360e(datetime('1-Jan-2002','Locale','en_US'), '1-Feb-2002')

%
% Determine the NumDays using a vector for EndDate.

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

% Copyright 2012 The MathWorks, Inc.