Esempio n. 1
0
 public function getRRuleMarker(&$template, &$sims, &$rems, &$wrapped, $view)
 {
     $eventStart = $this->origStartDate;
     if ($this->isAllday()) {
         $sims['###RRULE###'] = 'RECURRENCE-ID;VALUE=DATE:' . $eventStart->format('%Y%m%d');
     } else {
         if ($this->conf['view.']['ics.']['timezoneId'] != '') {
             $sims['###RRULE###'] = 'RECURRENCE-ID;TZID=' . $this->conf['view.']['ics.']['timezoneId'] . ':' . $eventStart->format('%Y%m%dT%H%M%S');
         } else {
             $offset = \TYPO3\CMS\Cal\Utility\Functions::strtotimeOffset($eventStart->getTime());
             $eventStart->subtractSeconds($offset);
             $sims['###RRULE###'] = 'RECURRENCE-ID:' . $eventStart->format('%Y%m%dT%H%M%SZ');
             $eventStart->addSeconds($offset);
         }
     }
 }
Esempio n. 2
0
 function getExdateMarker(&$template, &$sims, &$rems, &$wrapped, $view)
 {
     $sims['###EXDATE###'] = '';
     $exceptionDates = array();
     $daySeconds = $this->getStart()->getHour() * 3600 + $this->getStart()->getMinute() * 60;
     $offset = $daySeconds - \TYPO3\CMS\Cal\Utility\Functions::strtotimeOffset($this->getStart()->getTime());
     $exceptionEventStart = new \TYPO3\CMS\Cal\Model\CalDate();
     foreach ($this->getExceptionEvents() as $exceptionEvent) {
         // if ($exceptionEvent->getFreq() == 'none') {
         $exceptionEventStart->copy($exceptionEvent->getStart());
         $exceptionEventStart->addSeconds($offset);
         $exceptionDates[] = 'EXDATE:' . $exceptionEventStart->format('%Y%m%dT%H%M%SZ');
         // }
     }
     if (count($exceptionDates)) {
         $sims['###EXDATE###'] = implode(chr(10), $exceptionDates);
     }
 }