holidays - Holidays and nontrading days

Syntax

H = holidays(StartDate, EndDate)

Arguments

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

H = holidays(StartDate, EndDate) returns a vector of serial date numbers corresponding to the holidays and nontrading days between StartDate and EndDate, inclusive.

H = 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 2050. 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

H = holidays('jan 1 2001', 'jun 23 2001') 
returns
H =

      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, createholidays, fbusdate, isbusday, lbusdate

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS