Bug 77985 - change saturday to working day for Formula NETWORKDAYS
Summary: change saturday to working day for Formula NETWORKDAYS
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Winfried Donkers
URL:
Whiteboard: target:5.0.0
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-26 22:23 UTC by spbkumar023
Modified: 2015-09-10 07:06 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 spbkumar023 2014-04-26 22:23:49 UTC
Spreadsheet Libre Version: 4.2.3.3 and 4.2.1.x versions

1. No option to change saturday to working day.

2. Need to use Formula NETWORKDAYS(START_DATE, END_DATE, HOLIDAYS) to include Saturday as working day.

Any guidance/ help in achieving this would add to the functionality and flexibility in using LibreOffice.

Thanks & Regards,
Comment 1 Winfried Donkers 2014-04-28 06:30:47 UTC
(In reply to comment #0)
> Spreadsheet Libre Version: 4.2.3.3 and 4.2.1.x versions
> 
> 1. No option to change saturday to working day.
> 
> 2. Need to use Formula NETWORKDAYS(START_DATE, END_DATE, HOLIDAYS) to
> include Saturday as working day.
> 
> Any guidance/ help in achieving this would add to the functionality and
> flexibility in using LibreOffice.
> 
> Thanks & Regards,

I confirm that NETWORKDAYS persently does not work as described in 
http://docs.oasis-open.org/office/v1.2/cos01/OpenDocument-v1.2-cos01-part2.html#__RefHeading__1018198_715980110
I will investigate cause and fix it.

Note: function NETWORKDAYS.INTL has been implemented (see bug 79147) and will be available from version 4.3.0. This function offers full options to mark work/weekend days (i.e. every combination is possible).
Comment 2 Winfried Donkers 2014-04-28 09:34:46 UTC
The current NETWORKDAYS function in Calc is an implementation of Excel's Add-in function NETWORKDAYS, which has an argument fot holidays, but not for work/weekend-day definition.

As this behaviour has been in Calc since the start, I have changed the version number in the header.

It will be difficult to implement both Excel's NETWORKDAYS and OpenFormula NETWORKDAYS, but I may be able to do it.
Comment 3 Winfried Donkers 2014-07-09 14:47:00 UTC
I see no easy, fast way to implement this; setting the bug report back to new should others see a way to implement.
Comment 4 Owen Genat (retired) 2014-07-16 05:23:13 UTC
(In reply to comment #1)
> Note: function NETWORKDAYS.INTL has been implemented (see bug 79147)

Minor correction: bug 73147. Thanks for all your work on these functions Winfried.
Comment 5 Winfried Donkers 2015-05-01 09:54:02 UTC
Working on a solution.
Comment 6 Commit Notification 2015-05-05 19:15:58 UTC
Winfried Donkers committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=111952dccc1bf9e28e61c0233816248c848cbf53

fdo#77985 make calc function NETWORKDAYS comply with ODFF1.2

It will be available in 5.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.