Busday = isbusday(___,Holiday,Weekend),
using optional input arguments, returns logical true (1)
if Date is a business day, and logical false
(0) otherwise.
If the second argument, Holiday, is empty ([ ]), the default Holidays vector (generated with holidays and then associated to the NYSE calendar) is used.
Date — Date being checked serial date number | date character vector | datetime array
Date being checked, specified as a serial date number, date
character vector, or datetime array. Date can contain
multiple dates, but they must all be in the same format. Dates are
assumed to be whole date numbers or date stamps with no fractional
or time values.
Data Types: double | char | datetime
Holiday — Holidays and nontrading-day dates non-trading day vector is determined by the
routine holidays (default) | serial date number | date character vector | datetime array
Holidays and nontrading-day dates, specified as vector.
All dates in Holiday must be the same format:
either serial date numbers, or date character vectors, or datetime
arrays. (Using serial date numbers improves performance.) The holidays function supplies the default
vector.
Data Types: double | char | datetime
Weekend — Weekend days [1 0 0 0 0 0 1] (Saturday
and Sunday form the weekend) (default) | vector of length 7, containing 0 and 1,
where 1 indicates weekend days
Weekend days, specified as a vector of length 7, containing 0 and 1,
where 1 indicates weekend days and the first element
of this vector corresponds to Sunday.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.