OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office-formula message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [office-formula] 6.9.13 Networkdays


For interoperability reasons, I'd like to propose that we change the definition of the WORKDAYS and NETWORKDAYS functions to more closely follow the WORKDAYS.INTL and NETWORKDAYS.INTL functions defined in IS29500.  Changes would be to the order of the 3rd and 4th parameters, supporting both a number and string form of the function and the syntax of the weekend-number and weekend-string parameters.

Below is an excerpt from From IS29500.1.18.17.7.227
*****************************************
NETWORKDAYS.INTL
Syntax:
Number form: NETWORKDAYS.INTL (  start-date  ,  end-date  [ , [ weekend-number ][  ,  holidays  ]]  )
String form: NETWORKDAYS.INTL (  start-date  ,  end-date  [ , [ weekend-string ][  ,  holidays  ]]  )
Description: Computes the number of whole working days between start-date and end-date. Weekend days and any holidays specified by holidays are not considered as working days.
Arguments:
Name    Type    Description
start-date      Number  The dates for which the difference is to be computed. start-date can be earlier than, the same as, or later than end-date.
end-date        Number
weekend-number  Number  Indicates the days of the week that are weekend days and are not included in the number of whole working days between start-date and end-date. Values are shown in the table below.
weekend-string  String  Indicates the days of the week that are weekend days and are not included in the number of whole working days between start-date and end-date.

Values of weekend-string are seven characters long and each character in the string represents a day of the week, beginning with Monday. [Example: “0000011” would result in a weekend that is Saturday and Sunday. end example]
holidays        reference, array        An optional set of one or more dates that are to be excluded from the working day calendar. holidays shall be a range of cells that contain the dates, or an array constant of the serial values that represent those dates. The ordering of dates or serial values in holidays can be arbitrary.

weekend-number  Weekend days
1 or omitted    Saturday, Sunday
2       Sunday, Monday
3       Monday, Tuesday
4       Tuesday, Wednesday
5       Wednesday, Thursday
6       Thursday, Friday
7       Friday, Saturday
11      Sunday only
12      Monday only
13      Tuesday only
14      Wednesday only
15      Thursday only
16      Friday only
17      Saturday only

Return Type and Value: number – The number of whole working days between start-date and end-date, excluding the specified weekend days and holidays. If start-date is later than end-date, the return value shall be negative, and the magnitude shall be the number of whole working days.
However, if
•       start-date is out of range for the current date base value, #NUM! is returned.
•       end-date is out of range for the current date base value, #NUM! is returned.
[Example:

NETWORKDAYS.INTL(DATE(2006,1,1),DATE(2006,1,31)) results in 23
NETWORKDAYS.INTL(DATE(2006,1,31),DATE(2006,1,1)) results in -23
NETWORKDAYS.INTL(DATE(2006,1,1),DATE(2006,2,1),7,{"2006/1/2","2006/1/16"}) results in 21
NETWORKDAYS.INTL(DATE(2006,1,1),DATE(2006,2,1),"0000110",{"2006/1/2","2006/1/16"}) results in 21

end example]


Eric


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]