public function format(\CultureFeed_Cdb_Data_Calendar_PeriodList $periodList)
 {
     $period = $periodList->current();
     $output = $this->generateDates($period->getDateFrom(), $period->getDateTo());
     if (!is_null($period->getWeekScheme())) {
         $output .= $this->generateWeekscheme($period->getWeekScheme());
     }
     return $this->formatSummary($output);
 }
 public function format(\CultureFeed_Cdb_Data_Calendar_PeriodList $periodList)
 {
     $period = $periodList->current();
     $startDate = $this->dateFromString($period->getDateFrom());
     $startDate->setTime(0, 0, 1);
     $now = new DateTime();
     if ($startDate > $now) {
         return $this->formatNotStarted($startDate);
     } else {
         $endDate = $this->dateFromString($period->getDateTo());
         return $this->formatStarted($endDate);
     }
 }
 public function format(\CultureFeed_Cdb_Data_Calendar_PeriodList $periodList)
 {
     $fmt = new IntlDateFormatter('nl_BE', IntlDateFormatter::FULL, IntlDateFormatter::FULL, date_default_timezone_get(), IntlDateFormatter::GREGORIAN, 'd MMMM yyyy');
     $fmtDay = new IntlDateFormatter('nl_BE', IntlDateFormatter::FULL, IntlDateFormatter::FULL, date_default_timezone_get(), IntlDateFormatter::GREGORIAN, 'eeee');
     $period = $periodList->current();
     $dateFromString = $period->getDateFrom();
     $dateFrom = strtotime($dateFromString);
     $intlDateFrom = $fmt->format($dateFrom);
     $intlDateFromDay = $fmtDay->format($dateFrom);
     $dateToString = $period->getDateTo();
     $dateTo = strtotime($dateToString);
     $intlDateTo = $fmt->format($dateTo);
     if ($intlDateFrom == $intlDateTo) {
         $output = $intlDateFromDay . ' ' . $intlDateFrom;
     } else {
         $output = 'Van ' . $intlDateFrom . ' tot ' . $intlDateTo;
     }
     return $output;
 }
 public function format(\CultureFeed_Cdb_Data_Calendar_PeriodList $periodList)
 {
     $fmt = new IntlDateFormatter('nl_BE', IntlDateFormatter::FULL, IntlDateFormatter::FULL, date_default_timezone_get(), IntlDateFormatter::GREGORIAN, 'd MMMM yyyy');
     $fmtDay = new IntlDateFormatter('nl_BE', IntlDateFormatter::FULL, IntlDateFormatter::FULL, date_default_timezone_get(), IntlDateFormatter::GREGORIAN, 'eeee');
     $period = $periodList->current();
     $dateFromString = $period->getDateFrom();
     $dateFrom = strtotime($dateFromString);
     $intlDateFrom = $fmt->format($dateFrom);
     $intlDateFromDay = $fmtDay->format($dateFrom);
     $dateToString = $period->getDateTo();
     $dateTo = strtotime($dateToString);
     $intlDateTo = $fmt->format($dateTo);
     if ($intlDateFrom == $intlDateTo) {
         $output = '<span class="cf-weekday cf-meta">' . $intlDateFromDay . '</span>';
         $output .= ' ';
         $output .= '<span class="cf-date">' . $intlDateFrom . '</span>';
     } else {
         $output = '<span class="cf-from cf-meta">Van</span> <span class="cf-date">' . $intlDateFrom . '</span> ';
         $output .= '<span class="cf-to cf-meta">tot</span> <span class="cf-date">' . $intlDateTo . '</span>';
     }
     return $output;
 }