Date of future or past workday
EndDate = datewrkdy(StartDate, NumberWorkDays, NumberHolidays)
Start date vector. Enter as serial date numbers or date strings.
Vector containing number of work or business days in future (positive) or past (negative), including the starting date.
Vector containing values for the number of holidays within
Any input can contain multiple values, but if so, all other
inputs must contain the same number of values or a single value that
applies to all. For example, if
StartDate is an
n-row character array of date strings, then
1 vector of integers
or a single integer.
EndDate is then an
of date numbers.
EndDate = datewrkdy(StartDate, NumberWorkDays, NumberHolidays) returns
the serial number of the date a given number of workdays before or
after the start date.
datestr to convert
serial date numbers to formatted date strings.
Workday = datewrkdy('12-dec-2000', 16, 2); datestr(Workday)
ans = 04-Jan-2001
NumDays = [16; 20; 44]; Workdays = datewrkdy('12-dec-2000', NumDays, 2); datestr(Workdays)
ans = 4-Jan-2001 10-Jan-2001 13-Feb-2001