Item1528: SpreadSheetPlugin's WORKINGDAYS calculates incorrectly
Priority: Normal
Current State: Closed
Released In: 1.0.6
Target Release: patch
$WORKINGDAYS is returning invalid results. For example when I use %CALC{$WORKINGDAYS($TIME(2009/03/07),$TIME(2009/03/12))}%
it returns 2 though the actual workingdays are 4. As I'm trying to use this in report generation I'm getting faulty reports.
-- Reported by Bharath
ReddyMeka - 25 Apr 2009 from the other project
And confirmed.
I need to continue with my test cases for this plugin so we can iron out all these little bugs
--
KennethLavrsen - 26 Apr 2009
Note that the fix that Peter Thoeny did in their SVN 18077 and 18078 is not correct.
It calculates one day too few.
So one bad piece of code was replaced by another bad.
I will provide a proper fix soon
And I will TEST it before I release it.
--
KennethLavrsen - 10 May 2009
The old algoritm was very wrong.
And additionally the TIME had been changed in TWiki 4.0 to auto convert dates to gmt.
This is a disaster for us living to the east of Greenwich.
The best is that the default is that whatever people enter is assumed to be GMT.
TODAY is also GMT. And most other time features default to GMT.
So I changed it back. But for those that need compatibility and live to the west of GMT
or on GMT I have provided a new preference setting that can move things back.
However even for the western world the GMT should work just fine.
The default at GMT also avoid issues with daylight saving time.
For the TIME I have added the feature LOCAL so you can still force the local to GMT
translation if you need it a specific place.
I will follow up with a checkin of a massive auto test case to test WORKINGDAYS and TIME
Note that fix provided by "the other project" is no good.
New
SpreadSheetPlugin has been uploaded to Extensions web.
Note that this is the same as
TWikibug:Item6253 but the fix provided on that project is absolutely no good.
--
KennethLavrsen - 11 May 2009