%% Find NYSE Closures
% Find the NYSE closures for 1899:

datestr(nyseclosures('1-jan-1899','31-dec-1899'),'dd-mmm-yyyy ddd')

%
% Find the NYSE closures for 1899 using a datetime array:

[Closures,SatTransition] = nyseclosures(datetime('1-jan-1899','Locale','en_US'),'30-Jun-1899')

%
% Find the NYSE closure dates using the 'Archaic' value for WorkWeekFormat:

datestr(nyseclosures('1-sep-1952','31-oct-1952','a'),1)

% The exchange was closed on Saturdays for much of 1952 before the official transition to a 5-day workweek.
% Copyright 2012 The MathWorks, Inc.