[Tickets #5306] Recur_Yearly_Date: recurInterval = 2 years
bugs at bugs.horde.org
bugs at bugs.horde.org
Wed Apr 25 14:14:45 UTC 2007
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=5306
-----------------------------------------------------------------------
Ticket | 5306
Created By | patrick.abiven at apitech.fr
Summary | Recur_Yearly_Date: recurInterval = 2 years
Queue | Kronolith
Version | HEAD
Type | Bug
State | Unconfirmed
Priority | 1. Low
Owners |
-----------------------------------------------------------------------
patrick.abiven at apitech.fr (2007-04-25 07:14) wrote:
Hello
After creating a yearly event having a 2 years recurring interval, when
using the year view, only the first occurence is shown.
Event: 25/04/07, yearly , 2 years -> the next occurence should be
25/04/09. But when displaying 2009 year view, the occurence is not shown.
It seems that in lib/Driver.php, the calculation done at line 525 is not
correct.
$offset = $after->year - $estart->year;
if ($offset > 0) {
$offset = (($offset + $this->recurInterval - 1) /
$this->recurInterval) *
$this->recurInterval;
$estart->year += $offset;
}
In our case: $offset is initialized to 2009 - 2007 = 2
and after using a recurInterval = 2, $offset is set to 3.
The month calculation line 473, uses floor() function.
Regards
Patrick
More information about the bugs
mailing list