$count = 1;
try {
+ $this->recursion->RFC5545_COMPLIANT = When::IGNORE;
$this->recursion->generateOccurrences();
}
catch (Exception $e) {
- CRM_Core_Error::statusBounce($e->getMessage());
+ CRM_Core_Session::setStatus(ts($e->getMessage()));
return $recursionDates;
}
foreach ($this->recursion->occurrences as $result) {
- $skip = FALSE;
- if ($result == $this->recursion_start_date) {
- // skip the recursion-start-date from the list we going to generate
- $skip = TRUE;
- }
$baseDate = $result->format('YmdHis');
foreach ($this->dateColumns as $col) {
}
}
- if ($skip) {
- unset($recursionDates[$count]);
- if ($initialCount && ($initialCount > 0)) {
- // lets increase the counter, so we get correct number of occurrences
- $initialCount++;
- $this->recursion->count($initialCount);
- }
- continue;
- }
$count++;
}
}
}
$repetition_frequency_unit = $repetition_frequency_unit . 'ly';
$r->startDate($start)
+ ->exclusions([$start])
->freq($repetition_frequency_unit);
}
$this->assertEquals(5, count($generatedEntities['civicrm_activity']), "Cehck if number of iterations are 5");
$expectedDates = [
'20141025103000',
- '20141227103000',
- '20150328103000',
- '20150627103000',
- '20150926103000',
+ '20150124103000',
+ '20150425103000',
+ '20150725103000',
+ '20151024103000',
];
foreach ($generatedEntities['civicrm_activity'] as $entityID) {
$this->assertDBNotNull('CRM_Activity_DAO_Activity', $entityID, 'id',