%% Specify Numeric and Duration Inputs That Overflow
% Create a numeric array representing numbers of days.

D = [1 3;4 2]

%
% Create a duration array representing elapsed times in hours. One element specifies 25 hours, which is longer than one day.

T = hours([1 2; 25 12])

%
% Create a calendar duration array. Specify input arguments D, T, and scalar values for the year and month. The second input, 13, specifies more months than there are in one year.

L = calendarDuration(1,13,D,T)

% Month values greater than 12 carry over to years in the display. However, hour values greater than 24 do not carry over to days in the display. Due to Daylight Saving Time, the number of hours in a calendar day is not necessarily 24 hours.
% Copyright 2015 The MathWorks, Inc.