Summary: | ATP - WORKDAY Function returns incorrect date | ||
---|---|---|---|
Product: | POI | Reporter: | stuart <stuart.donald> |
Component: | POI Overall | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All | ||
Attachments: | Patch with Unit Tests and Fix |
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 WORKDAY(DATE(2013,09,30),-1) 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.