Bug 100353 - HELP for NETWORKDAYS function not complete/correct
Summary: HELP for NETWORKDAYS function not complete/correct
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Stanislav Horacek
URL:
Whiteboard: target:5.3.0
Keywords:
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:


Attachments

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:
https://gerrit.libreoffice.org/#/c/28967/
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":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=29627a94f11a6c7c27041949b2353fb29fa12141

tdf#100353 describe fourth argument of NETWORKDAYS function