Date of future or past workday
EndDate = datewrkdy(StartDate, NumberWorkDays, NumberHolidays)
Start date vector. Enter as serial date numbers, date character vectors, or datetime arrays.
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 character vectors, 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.
StartDate is a serial date number or date
EndDate is returned as a date
datestr to convert
serial date numbers to formatted date character vectors.
StartDate is a datetime array, then
returned as a datetime array.
Workday = datewrkdy('12-dec-2000', 16, 2); datestr(Workday)
ans = 04-Jan-2001
Workday = datewrkdy(datetime('12-dec-2000','Locale','en_US'), 16, 2)
Workday = 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