%% Calendar Differences Between Datetime Values
% Create a datetime array and then compute the differences between the values in terms of calendar components.

t = [datetime('yesterday');datetime('today');datetime('tomorrow')]

%

D = caldiff(t)

% Copyright 2015 The MathWorks, Inc.