| Financial Toolbox | ![]() |
Syntax
Holidays = holidays(StartDate,EndDate)
StartDate |
Start date vector. Enter as serial date numbers or date strings. |
EndDate |
End date vector. Enter as serial date numbers or date strings. |
Description
Holidays = holidays(
returns a vector of serial date numbers corresponding to the holidays and nontrading days between StartDate, EndDate)
StartDate and EndDate, inclusive.
Holidays = holidays
returns a vector of serial date numbers corresponding to all holidays and nontrading days.
As shipped, this function contains all holidays and special nontrading days for the New York Stock Exchange between 1950 and 2030, inclusive (681 dates). You can edit the holidays.m file to contain your own holidays and nontrading days. By definition, holidays and nontrading days are those that occur on weekdays.
Examples
Holidays = holidays('jan 1 2001', 'jun 23 2001')
returns
Holidays =
730852
730901
730954
730999
which are the serial date numbers for
01-Jan-2001 (New Year's Day) 19-Feb-2001 (President's Day) 13-Apr-2001 (Good Friday) 28-May-2001 (Memorial Day)
See Also
busdate, fbusdate, isbusday, lbusdate
| highlow | hour | ![]() |