6.0.0-beta1
9/17/25

[#5306] Recur_Yearly_Date: recurInterval = 2 years
Summary Recur_Yearly_Date: recurInterval = 2 years
Queue Kronolith
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners
Requester patrick.abiven (at) apitech (dot) fr
Created 04/25/2007 (6720 days ago)
Due
Updated 05/02/2007 (6713 days ago)
Assigned 04/30/2007 (6715 days ago)
Resolved 05/02/2007 (6713 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
05/02/2007 10:27:30 PM Jan Schneider Comment #4
State ⇒ Resolved
Reply to this comment
Correct, the floor() was missing, nice catch. Fixed in CVS.
05/02/2007 03:13:52 PM patrick (dot) abiven (at) apitech (dot) fr Comment #3 Reply to this comment
Hello

Sorry for my mistake, the line numbers are for lib/Reccurence.php (and 
not for lib/Driver.php).

Regards

Patrick
Those line numbers don't match up; it seems like either you're not
really using HEAD, or you're using a very old version of it. If you
do have a CVS checkout, please update and then test again and provide
us with any updated errors and/or line numbers. If you're not using
HEAD, please provide more accurate version information.
04/30/2007 08:39:12 PM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
Those line numbers don't match up; it seems like either you're not 
really using HEAD, or you're using a very old version of it. If you do 
have a CVS checkout, please update and then test again and provide us 
with any updated errors and/or line numbers. If you're not using HEAD, 
please provide more accurate version information.
04/25/2007 02:14:45 PM patrick (dot) abiven (at) apitech (dot) fr Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Recur_Yearly_Date: recurInterval = 2 years
Queue ⇒ Kronolith
State ⇒ Unconfirmed
Reply to this comment
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

Saved Queries