Rewrite:
6.10.14 NETWORKDAYS
Summary: Returns the whole number of work days between two dates.
Syntax: NETWORKDAYS( DateParam Date1 ; DateParam Date2 [ ; [ DateSequence Holidays ] [ ; NumberSequence Workdays ] ] )
Returns: Number
Constraints: None
Semantics: Returns the whole number of days between two dates, ignoring weekends.
Work days are defined as non-weekend, non-holiday days. By default, weekends are Saturdays
and Sundays and there are no holidays.
The optional 3rd parameter Holidays can be used to specify a list of dates to be treated as
holidays. Note that this parameter can be omitted as an empty parameter (two consecutive ;;
semicolons) to be able to pass the set of Workdays without Holidays.
The optional 4th parameter Workdays can be used to specify a different definition for the standard
work week by passing in a list of numbers which define which days of the week are
workdays (indicated by 0) or not (indicated by non-zero) in order Sunday, Monday,...,Saturday.
So, the default definition of the work week excludes Saturday and Sunday and is:
{1;0;0;0;0;0;1}. To define the work week as excluding Friday and Saturday, the third parameter
would be: {0;0;0;0;0;1;1}.
6.10.22 WORKDAY
Summary: Returns the date serial number which is a specified number of work days before or after an
input date.
Syntax: WORKDAY( DateParam Date ; Number Offset [ ; [ DateSequence Holidays ] [ ; NumberSequence Workdays ] ] )
Returns: DateTime
Constraints: None
Semantics: Returns the date serial number for the day that is offset from the input Date parameter
by the number of work days specified in the Offset parameter. If Offset is negative, the offset will
return a date prior to Date. If Offset is positive, a date later Date is returned. If Offset is zero, then
Date is returned.
Work days are defined as non-weekend, non-holiday days. By default, weekends are Saturdays
and Sundays and there are no holidays.
The optional 3rd parameter Holidays can be used to specify a list of dates to be treated as holidays.
Note that this parameter can be omitted as an empty parameter (two consecutive ;; semicolons) to
be able to pass the set of Workdays without Holidays.
The optional 4th parameter Workdays can be used to specify a different definition for the standard
work week by passing in a list of numbers which define which days of the week are workdays (indicated by 0)
or not (indicated by non-zero) in order Sunday, Monday,...,Saturday.
If all seven numbers in Workdays are non-zero and Offset is also non-zero, WORKDAY returns an error.
Note: The default definition of the work week that excludes Saturday and Sunday and is:{1;0;0;0;0;0;1}
. To define the work week as excluding Friday and Saturday, the third parameter
would be:
{0;0;0;0;0;1;1}
.