public function _Dates()
 {
     list($strStartDate, $strEndDate) = CalendarUtil::getDateString($this->StartDate, $this->EndDate);
     $html = "<span class='dtstart' title='" . $this->MicroformatStart() . "'>" . $strStartDate . "</span>";
     $html .= $strEndDate != "" ? self::$date_delimiter : "";
     $html .= "<span class='dtend' title='" . $this->MicroformatEnd() . "'>";
     $html .= $strEndDate != "" ? $strEndDate : "";
     $html .= "</span>";
     return $html;
 }
Exemple #2
0
 public function DateHeader()
 {
     switch ($this->view) {
         case "day":
             return CalendarUtil::localize($this->start_date->get(), null, CalendarUtil::ONE_DAY_HEADER);
             break;
         case "month":
             return CalendarUtil::localize($this->start_date->get(), null, CalendarUtil::MONTH_HEADER);
             break;
         case "year":
             return CalendarUtil::localize($this->start_date->get(), null, CalendarUtil::YEAR_HEADER);
             break;
         case "range":
             list($strStartDate, $strEndDate) = CalendarUtil::getDateString($this->start_date->date(), $this->end_date->date());
             return $strStartDate . $strEndDate;
             break;
         default:
             return $this->DefaultDateHeader;
             break;
     }
 }
 /**
  * @return string
  */
 public function Summary()
 {
     $date = implode(' ', CalendarUtil::getDateString($this->StartDate, $this->EndDate));
     if ($this->is_all_day) {
         return sprintf(_t('EventManagement.DATEALLDAY', '%s (all day)'), $date);
     }
     if (!$this->StartTime) {
         return $date;
     }
     $time = $this->obj('StartTime')->Nice();
     if ($this->EndTime) {
         $time .= ' - ' . $this->obj('EndTime')->Nice();
     }
     return "{$date} {$time}";
 }