Bug 55649 - ATP - WORKDAY Function returns incorrect date
Summary: ATP - WORKDAY Function returns incorrect date
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2013-10-10 20:57 UTC by stuart
Modified: 2013-10-10 21:55 UTC (History)
0 users

Patch with Unit Tests and Fix (4.74 KB, text/plain)
2013-10-10 20:57 UTC, stuart

Note You need to log in before you can comment on or make changes to this bug.
Description stuart 2013-10-10 20:57:38 UTC
Created attachment 30920 [details]
Patch with Unit Tests and Fix

When spanning a weekend, or the start date is a weekend, the WORKDAY function returns an incorrect result. There are probably a lot of other circumstances where it could have returned an incorrect result.

As an example


should return 2013/09/27 

but actually returns 2013/09/24

I have attached a patch which includes some new Unit Tests to reproduce the issue, and also a fix for the function to make the tests pass.
Comment 1 Cédric Walter 2013-10-10 21:55:37 UTC
Thanks for your patch, it has been reviewed and merged in trunk in r1531124