%% Differences Using Specific Calendar Components
% Create a datetime array and then compute the differences between the values in terms of days.

t = datetime('now') + calmonths(0:3)

%

D = caldiff(t,'days')

%
% Computer the differences between the datetime values in terms of weeks and days.

D = caldiff(t,{'weeks','days'})

% Copyright 2015 The MathWorks, Inc.