Bug 100353 - HELP for NETWORKDAYS function not complete/correct
Summary: HELP for NETWORKDAYS function not complete/correct
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Stanislav Horacek
Whiteboard: target:5.3.0
Depends on:
Blocks: HelpGaps-NewFeatures
  Show dependency treegraph
Reported: 2016-06-13 11:58 UTC by raal
Modified: 2016-09-17 19:20 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description raal 2016-06-13 11:58:25 UTC
Help: https://help.libreoffice.org/Calc/NETWORKDAYS

ODF: Definition in ODF  - NETWORKDAYS

Summary: Returns the whole number of work days between two dates.

Syntax: NETWORKDAYS( DateParam Date1 ; DateParam Date2 [ ; [ DateSequence holidays ] [ ; LogicalSequence workdays ] ] )

Returns: Number

Constraints: None

Semantics: Returns the whole number of work days between two dates.

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}.

LO Calc works like defined in ODF specification. Formula =NETWORKDAYS(K2;K2+6;;{1;0;1;0;1;0;1})  works.
Help should reflect 4th parameter.
Comment 1 Stanislav Horacek 2016-09-16 16:12:33 UTC
Patch submitted to Gerrit:
Comment 2 Commit Notification 2016-09-17 07:14:50 UTC
Stanislav Horacek committed a patch related to this issue.
It has been pushed to "master":


tdf#100353 describe fourth argument of NETWORKDAYS function