Bug 60452

Summary: [PATCH] WorkdayCalculator calculateWorkdays does return wrong value for same day input
Product: POI Reporter: Fabio <fabio.heer>
Component: SS CommonAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: critical CC: haeni.sebastian
Priority: P2 Keywords: PatchAvailable
Version: 3.16-dev   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: Patch for WorkdayCalculator

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!