| Financial Toolbox | Search  Help Desk |
| fbusdate | Examples See Also |
Syntax
d = fbusdate(y, m, hol) d = fbusdate(y, m)
Arguments
ym1 to 12.holhol must be the same format: either serial date numbers or date strings. (Using date numbers improves performance.) The holidays function supplies the default vector.Description
d = fbusdate(y, m, hol)
returns the serial date number for the first business date of the given year y and month m where hol specifies non-trading days.
y and m can contain multiple values. If one contains multiple values, the other must contain the same number of values or a single value that applies to all. For example, if y is a 1-by-N vector of integers, then m must be a 1-by-N vector of integers or a single integer. d is then a 1-by-N vector of date numbers.
Use the function datestr to convert serial date numbers to formatted date strings.
Examples
d = fbusdate(1997, 11)
d =
729697
datestr(d)
ans =
03-Nov-1997
y = [1997 1998 1999];
d = fbusdate(y, 11); datestr(d)
ans =
03-Nov-1997
02-Nov-1998
01-Nov-1999
See Also
busdate, eomdate, holidays, isbusday, lbusdate