Bug 60452 - [PATCH] WorkdayCalculator calculateWorkdays does return wrong value for same day input
Summary: [PATCH] WorkdayCalculator calculateWorkdays does return wrong value for same ...
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: 3.16-dev
Hardware: PC Linux
: P2 critical (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2016-12-07 17:06 UTC by Fabio
Modified: 2016-12-30 15:18 UTC (History)
1 user (show)



Attachments
Patch for WorkdayCalculator (3.78 KB, patch)
2016-12-07 17:06 UTC, Fabio
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio 2016-12-07 17:06:23 UTC
Created attachment 34505 [details]
Patch for WorkdayCalculator

The excel function NETWORKDAYS can be used with two equal input dates, e.g. 2017-01-01, 2017-01-01. In this case, the underlying WorkdayCalculator returns erroneously the value 2 instead of 0.

This behavior is not conform with the calculations in MS Office and LibreOffice.

Tests and a fix is provided in the attachment.
Comment 1 Dominik Stadler 2016-12-30 15:18:20 UTC
Applied via r1776588, thanks for the Patch!