%% Determine Business Days
% Determine the next business day when Date is a character vector.

 Busday = busdate('3-Jul-2001', 1)
datestr(Busday)

%
% Indicate that Saturday is a business day by appropriately setting the Weekend argument. July 4, 2003 falls on a Friday. Use busdate to verify that Saturday, July 5, is actually a business day.

Weekend = [1 0 0 0 0 0 0];
Date = datestr(busdate('3-Jul-2003', 1, [], Weekend))

%
% If either Date or Holiday are datetime arrays, Busday is returned as a datetime array.

Busday = busdate(datetime('3-Jul-2001','Locale','en_US'), 1)

% Copyright 2012 The MathWorks, Inc.