| Financial Toolbox™ | ![]() |
Busday = isbusday(Date, Holiday, Weekend)
Date | Date(s) being checked. Enter as a serial date number or date string. Date can contain multiple dates, but they must all be in the same format. |
Holiday | (Optional) Vector of holidays and nontrading-day dates. All dates in Holiday must be the same format: either serial date numbers or date strings. (Using date numbers improves performance.) The holidays function supplies the default vector. |
Weekend | (Optional) Vector of length 7, containing 0 and 1, the value 1 indicating weekend days. The first element of this vector corresponds to Sunday. Thus, when Saturday and Sunday form the weekend (default), then Weekend = [1 0 0 0 0 0 1]. |
Busday = isbusday(Date, Holiday, Weekend) returns logical true (1) if Date is a business day and logical false (0) otherwise.
Example 1:
Busday = isbusday('16 jun 2001')
Busday =
0
Date = ['15 feb 2001'; '16 feb 2001'; '17 feb 2001'];
Busday = isbusday(Date)
Busday =
1
1
0
Example 2: Set June 21, 2003 (a Saturday) as a business day.
Weekend = [1 0 0 0 0 0 0];
isbusday('June 21, 2003', [], Weekend)
ans =
1
busdate, fbusdate, holidays, lbusdate
![]() | irr | iscompatible | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |