NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use
trunk.foswiki.org to view this page for some minimal testing.
Use
Item9693 for docu changes for 1.2 and 2.0.
Item809: CALC TIMEADD month is wrong
| Priority: |
CurrentState: |
AppliesTo: |
Component: |
WaitingFor: |
| Enhancement |
Confirmed |
Engine |
SpreadSheetPlugin |
|
from the code:
$value *= 3600*24*30.42 if( $scale =~ /^mon/i ); # FIXME: exact calc
$value *= 3600*24*365 if( $scale =~ /^year/i ); # FIXME: exact calc
--
SvenDowideit - 20 Jan 2009
Hmm. I understand and partly agree.
If I add one month to a date I expect same day of month, same time and simply the calendar month increased to the next one.
But the way the CALC works I can actually also specify 0.6 month. I can have a formular that calculates decimal numbers and add a fraction of a month.
So the exact way to implement this change needs to be carefully thought of.
Also to implement this we really need a non-default CPAN lib. We should consider including one in our own Foswiki CPAN lib. Like Date::Calc.
That also enables adding additional features like adding working days.
Changing to enhancement.
--
KennethLavrsen - 07 Feb 2009
I was thinking about
DateTimePlugin, but that plugin also does not handle inc_month. Shortcoming of that plugin (and date handling in general in Perl) is that dates before 1970 are not supported.
Date::Calc may be a solution, but
DateTime.pm seems more featurefull.
--
ArthurClemens - 07 Feb 2009