%% Find Quarter Number of Dates

t = datetime(2013,05,31):calmonths(3):datetime(2014,05,31)

%

q = quarter(t)

% Copyright 2015 The MathWorks, Inc.