%% Shift Current Date to End of Current Month
% Define the current date.

t = datetime('today')

%
% Shift the date to the end of the same month.

t2 = dateshift(t,'end','month')

% Copyright 2015 The MathWorks, Inc.