本文整理汇总了PHP中JEVHelper::getTime方法的典型用法代码示例。如果您正苦于以下问题:PHP JEVHelper::getTime方法的具体用法?PHP JEVHelper::getTime怎么用?PHP JEVHelper::getTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JEVHelper
的用法示例。
在下文中一共展示了JEVHelper::getTime方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct($event, $datamodel, $view = false)
{
$cfg = JEVConfig::getInstance();
$this->event = $event;
$this->_datamodel = $datamodel;
$this->_view = $view;
$this->start_publish = $this->event->getUnixStartDate();
$this->stop_publish = $this->event->getUnixEndDate();
$this->title = $this->event->title();
// On mouse over date formats
$this->start_date = JEventsHTML::getDateFormat($this->event->yup(), $this->event->mup(), $this->event->dup(), 0);
//$this->start_time = $this->event->startTime() ;
$this->start_time = JEVHelper::getTime($this->event->getUnixStartTime(), $this->event->hup(), $this->event->minup());
$this->stop_date = JEventsHTML::getDateFormat($this->event->ydn(), $this->event->mdn(), $this->event->ddn(), 0);
//$this->stop_time = $this->event->endTime() ;
$this->stop_time = JEVHelper::getTime($this->event->getUnixEndTime(), $this->event->hdn(), $this->event->mindn());
$this->stop_time_midnightFix = $this->stop_time;
$this->stop_date_midnightFix = $this->stop_date;
if ($this->event->sdn() == 59 && $this->event->mindn() == 59) {
$this->stop_time_midnightFix = JEVHelper::getTime($this->event->getUnixEndTime() + 1, 0, 0);
$this->stop_date_midnightFix = JEventsHTML::getDateFormat($this->event->ydn(), $this->event->mdn(), $this->event->ddn() + 1, 0);
}
// we only need the one helper so stick to default layout here!
$this->jevlayout = "default";
$this->addHelperPath(JEV_VIEWS . "/default/helpers");
$this->addHelperPath(JPATH_BASE . '/' . 'templates' . '/' . JFactory::getApplication()->getTemplate() . '/' . 'html' . '/' . JEV_COM_COMPONENT . '/' . "helpers");
// attach data model
$reg = JevRegistry::getInstance("jevents");
$this->datamodel = $reg->getReference("jevents.datamodel");
}
示例2: foreach
foreach ($data['hours']['timeless']['events'] as $row) {
$listyle = 'style="border-color:' . $row->bgcolor() . ';"';
echo "<li class='ev_td_li' {$listyle}>\n";
if (!$this->loadedFromTemplate('icalevent.list_row', $row, 0)) {
$this->viewEventRowNew($row);
echo ' :: ';
$this->viewEventCatRowNew($row);
}
echo "</li>\n";
}
echo "</ul></td></tr>\n";
}
for ($h = 0; $h < 24; $h++) {
if (count($data['hours'][$h]['events']) > 0) {
$hasevents = true;
$start_time = JEVHelper::getTime($data['hours'][$h]['hour_start']);
echo '<tr><td class="ev_td_right" colspan="3"><ul class="ev_ul">' . "\n";
foreach ($data['hours'][$h]['events'] as $row) {
$listyle = 'style="border-color:' . $row->bgcolor() . ';"';
echo "<li class='ev_td_li' {$listyle}>\n";
if (!$this->loadedFromTemplate('icalevent.list_row', $row, 0)) {
$this->viewEventRowNew($row);
echo ' :: ';
$this->viewEventCatRowNew($row);
}
echo "</li>\n";
}
echo "</ul></td></tr>\n";
}
}
if (!$hasevents) {
示例3:
<?php
echo '<h2><a href="' . $row->viewDetailLink($row->yup(), $row->mup(), $row->dup(), $Itemid) . '">' . $row->title() . ' </a></h2>';
?>
<dl class="article-info">
<dd>
<span class="icon-calendar"></span>
<?php
echo $row->startDate();
?>
</dd>
<dd>
<span class="icon-time"></span>
<?php
echo JEVHelper::getTime($row->getUnixStartTime(), $row->hup(), $row->minup()) . ' - ';
echo JEVHelper::getTime($row->getUnixEndTime(), $row->hdn(), $row->mindn());
?>
</dd>
<dd style="float:none;">
<span class="icon-globe"></span> <?php
echo $row->location();
?>
</dd>
</dl>
<?php
?>
</div>
</div>
示例4: getEventData
function getEventData($rpid, $jevtype, $year, $month, $day, $uid = "")
{
$data = array();
$pop = intval(JRequest::getVar('pop', 0));
$Itemid = JEVHelper::getItemid();
$db =& JFactory::getDBO();
$cfg =& JEVConfig::getInstance();
$row = $this->queryModel->listEventsById($rpid, 1, $jevtype);
// include unpublished events for publishers and above
$num_row = count($row);
// No matching rows - use uid as alternative
if ($num_row == 0 && strlen($uid) > 0) {
$rpid = $this->queryModel->findMatchingRepeat($uid, $year, $month, $day);
if (isset($rpid) && $rpid > 0) {
$row = $this->queryModel->listEventsById($rpid, 1, $jevtype);
// include unpublished events for publishers and above
$num_row = count($row);
}
}
if ($num_row) {
// process the new plugins
$dispatcher =& JDispatcher::getInstance();
$dispatcher->trigger('onGetEventData', array(&$row));
$params = new JParameter(null);
$row->contactlink = JEventsHTML::getUserMailtoLink($row->id(), $row->created_by());
$event_up = new JEventDate($row->publish_up());
$row->start_date = JEventsHTML::getDateFormat($event_up->year, $event_up->month, $event_up->day, 0);
$row->start_time = JEVHelper::getTime($row->getUnixStartTime());
$event_down = new JEventDate($row->publish_down());
$row->stop_date = JEventsHTML::getDateFormat($event_down->year, $event_down->month, $event_down->day, 0);
$row->stop_time = JEVHelper::getTime($row->getUnixEndTime());
$row->stop_time_midnightFix = $row->stop_time;
$row->stop_date_midnightFix = $row->stop_date;
if ($event_down->second == 59) {
$row->stop_time_midnightFix = JEVHelper::getTime($row->getUnixEndTime() + 1);
$row->stop_date_midnightFix = JEventsHTML::getDateFormat($event_down->year, $event_down->month, $event_down->day + 1, 0);
}
// *******************
// ** This cloaking should be done by mambot/Joomla function
// *******************
// Parse http and wrap in <a> tag
// trigger content plugin
$pattern = '[a-zA-Z0-9&?_.,=%\\-\\/]';
// Adresse
// don't convert address that already has a link tag
if (strpos($row->location(), '<a href=') === false) {
$row->location(preg_replace('#(http://)(' . $pattern . '*)#i', '<a href="\\1\\2">\\1\\2</a>', $row->location()));
}
$tmprow = new stdClass();
$tmprow->text = $row->location();
$dispatcher =& JDispatcher::getInstance();
JPluginHelper::importPlugin('content');
if (JVersion::isCompatible("1.6.0")) {
$dispatcher->trigger('onContentPrepare', array('com_jevents', &$tmprow, &$params, 0));
} else {
$dispatcher->trigger('onPrepareContent', array(&$tmprow, &$params, 0));
}
$row->location($tmprow->text);
//Contact
if (strpos($row->contact_info(), '<a href=') === false) {
$row->contact_info(preg_replace('#(http://)(' . $pattern . '*)#i', '<a href="\\1\\2">\\1\\2</a>', $row->contact_info()));
}
$tmprow = new stdClass();
$tmprow->text = $row->contact_info();
if (JVersion::isCompatible("1.6.0")) {
$dispatcher->trigger('onContentPrepare', array('com_jevents', &$tmprow, &$params, 0));
} else {
$dispatcher->trigger('onPrepareContent', array(&$tmprow, &$params, 0));
}
$row->contact_info($tmprow->text);
//Extra
if (strpos($row->extra_info(), '<a href=') === false) {
$row->extra_info(preg_replace('#(http://)(' . $pattern . '*)#i', '<a href="\\1\\2">\\1\\2</a>', $row->extra_info()));
}
//$row->extra_info(eregi_replace('[^(href=|href="|href=\')](((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)','\\1', $row->extra_info()));
$tmprow = new stdClass();
$tmprow->text = $row->extra_info();
if (JVersion::isCompatible("1.6.0")) {
$dispatcher->trigger('onContentPrepare', array('com_jevents', &$tmprow, &$params, 0));
} else {
$dispatcher->trigger('onPrepareContent', array(&$tmprow, &$params, 0));
}
$row->extra_info($tmprow->text);
$mask = JFactory::getApplication()->getCfg('hideAuthor') ? MASK_HIDEAUTHOR : 0;
$mask |= JFactory::getApplication()->getCfg('hideCreateDate') ? MASK_HIDECREATEDATE : 0;
$mask |= JFactory::getApplication()->getCfg('hideModifyDate') ? MASK_HIDEMODIFYDATE : 0;
$mask |= JFactory::getApplication()->getCfg('hidePdf') ? MASK_HIDEPDF : 0;
$mask |= JFactory::getApplication()->getCfg('hidePrint') ? MASK_HIDEPRINT : 0;
$mask |= JFactory::getApplication()->getCfg('hideEmail') ? MASK_HIDEEMAIL : 0;
//$mask |= JFactory::getApplication()->getCfg( 'vote' ) ? MASK_VOTES : 0;
$mask |= JFactory::getApplication()->getCfg('vote') ? MASK_VOTES | MASK_VOTEFORM : 0;
$mask |= $pop ? MASK_POPUP | MASK_IMAGES | MASK_BACKTOLIST : 0;
// Do main mambot processing here
// process bots
//$row->text = $row->content;
$params->set("image", 1);
$row->text = $row->content();
if (JVersion::isCompatible("1.6.0")) {
$dispatcher->trigger('onContentPrepare', array('com_jevents', &$row, &$params, 0));
} else {
//.........这里部分代码省略.........
示例5: repeatSummary
function repeatSummary()
{
$sum = "";
$cfg =& JEVConfig::getInstance();
// i.e. 1 = follow english word order by default
$grammar = intval(JText::_('JEV_REPEAT_GRAMMAR'));
if (!isset($this->start_date)) {
$event_up = new JEventDate($this->publish_up());
$this->start_date = JEventsHTML::getDateFormat($event_up->year, $event_up->month, $event_up->day, 0);
$this->start_time = JEVHelper::getTime($this->getUnixStartTime());
$event_down = new JEventDate($this->publish_down());
$this->stop_date = JEventsHTML::getDateFormat($event_down->year, $event_down->month, $event_down->day, 0);
$this->stop_time = JEVHelper::getTime($this->getUnixEndTime());
$this->stop_time_midnightFix = $this->stop_time;
$this->stop_date_midnightFix = $this->stop_date;
if ($event_down->second == 59) {
$this->stop_time_midnightFix = JEVHelper::getTime($this->getUnixEndTime() + 1);
$this->stop_date_midnightFix = JEventsHTML::getDateFormat($event_down->year, $event_down->month, $event_down->day + 1, 0);
}
}
if ($this->alldayevent()) {
if ($this->start_date == $this->stop_date) {
$sum .= $this->start_date;
} else {
$sum .= JText::_('JEV_FROM') . ' ' . $this->start_date . '<br />' . JText::_('JEV_TO') . ' ' . $this->stop_date . '<br/>';
}
} else {
if ($this->start_date == $this->stop_date) {
if ($this->noendtime()) {
$sum .= $this->start_date . ', ' . $this->start_time . '<br/>';
} else {
if ($this->start_time != $this->stop_time && !$this->alldayevent()) {
$sum .= $this->start_date . ', ' . $this->start_time . ' - ' . $this->stop_time_midnightFix . '<br/>';
} else {
if ($this->start_time == $this->stop_time && !$this->alldayevent()) {
$sum .= $this->start_date . ', ' . $this->start_time . '<br/>';
} else {
$sum .= $this->start_date . '<br/>';
}
}
}
} else {
// recurring events should have time related to recurrance not range of dates
if ($this->noendtime() && !($this->reccurtype() > 0)) {
$sum .= $this->start_date . ', ' . $this->start_time . '<br/>' . JText::_('JEV_TO') . ' ' . $this->stop_date . '<br/>';
} else {
if ($this->start_time != $this->stop_time && !($this->reccurtype() > 0)) {
$sum .= JText::_('JEV_FROM') . ' ' . $this->start_date . ' - ' . $this->start_time . '<br />' . JText::_('JEV_TO') . ' ' . $this->stop_date . ' - ' . $this->stop_time_midnightFix . '<br/>';
} else {
$sum .= JText::_('JEV_FROM') . ' ' . $this->start_date . '<br />' . JText::_('JEV_TO') . ' ' . $this->stop_date . '<br/>';
}
}
}
}
if ($this->_freq == "none") {
return $sum;
}
return $sum;
// TODO consider finishing this later - it is VERY COMPLICATED
if ($this->_interval > 0) {
if ($this->_interval == 1) {
switch ($this->_freq) {
case 'DAILY':
$reccur = JText::_('JEV_ALLDAYS');
break;
case 'WEEKLY':
$reccur = JText::_('JEV_EACHWEEK');
break;
case 'MONTHLY':
$reccur = JText::_('JEV_EACHMONTH');
break;
case 'YEARLY':
$reccur = JText::_('JEV_EACHYEAR');
break;
}
} else {
switch ($this->_freq) {
case 'DAILY':
$reccur = JText::_('JEV_EVERY_N_DAYS');
break;
case 'WEEKLY':
$reccur = JText::_('JEV_EVERY_N_WEEKS');
break;
case 'MONTHLY':
$reccur = JText::_('JEV_EVERY_N_MONTHS');
break;
case 'YEARLY':
$reccur = JText::_('JEV_EVERY_N_YEARS');
break;
}
$reccur = sprintf($reccur, $this->_interval);
}
if ($this->_count == 99999) {
list($y, $m, $d) = explode(":", JevDate::strftime("%Y:%m:%d", $this->until()));
$extra = JText::_('JEV_UNTIL') . " " . JEventsHTML::getDateFormat($y, $m, $d, 1);
} else {
$extra = sprintf(JText::_('JEV_COUNTREPEATS'), $this->_count);
}
$sum .= $reccur . " " . $extra;
}
//.........这里部分代码省略.........
示例6: DefaultLoadedFromTemplate
//.........这里部分代码省略.........
}
$created = JevDate::getDate($event->created(), $jtz);
$search[] = "{{CREATED}}";
$replace[] = $created->toFormat(JText::_("DATE_FORMAT_CREATED"));
$blank[] = "";
break;
case "{{ACCESS}}":
$search[] = "{{ACCESS}}";
$replace[] = $event->getAccessName();
$blank[] = "";
break;
case "{{REPEATSUMMARY}}":
case "{{STARTDATE}}":
case "{{ENDDATE}}":
case "{{STARTTIME}}":
case "{{ENDTIME}}":
case "{{STARTTZ}}":
case "{{ENDTZ}}":
case "{{ISOSTART}}":
case "{{ISOEND}}":
case "{{DURATION}}":
case "{{MULTIENDDATE}}":
if ($template_name == "icalevent.detail_body") {
$search[] = "{{REPEATSUMMARY}}";
$repeatsummary = $view->repeatSummary($event);
if (!$repeatsummary) {
$repeatsummary = $event->repeatSummary();
}
$replace[] = $repeatsummary;
//$replace[] = $event->repeatSummary();
$blank[] = "";
$row = $event;
$start_date = JEventsHTML::getDateFormat($row->yup(), $row->mup(), $row->dup(), 0);
$start_time = JEVHelper::getTime($row->getUnixStartTime(), $row->hup(), $row->minup());
$stop_date = JEventsHTML::getDateFormat($row->ydn(), $row->mdn(), $row->ddn(), 0);
$stop_time = JEVHelper::getTime($row->getUnixEndTime(), $row->hdn(), $row->mindn());
$stop_time_midnightFix = $stop_time;
$stop_date_midnightFix = $stop_date;
if ($row->sdn() == 59 && $row->mindn() == 59) {
$stop_time_midnightFix = JEVHelper::getTime($row->getUnixEndTime() + 1, 0, 0);
$stop_date_midnightFix = JEventsHTML::getDateFormat($row->ydn(), $row->mdn(), $row->ddn() + 1, 0);
}
$search[] = "{{STARTDATE}}";
$replace[] = $start_date;
$blank[] = "";
$search[] = "{{ENDDATE}}";
$replace[] = $stop_date;
$blank[] = "";
$search[] = "{{STARTTIME}}";
$replace[] = $row->alldayevent() ? "" : $start_time;
$blank[] = "";
$search[] = "{{ENDTIME}}";
$replace[] = $row->noendtime() || $row->alldayevent() ? "" : $stop_time_midnightFix;
$blank[] = "";
$search[] = "{{STARTTZ}}";
$replace[] = $row->alldayevent() ? "" : $start_time;
$blank[] = "";
$search[] = "{{ENDTZ}}";
$replace[] = $row->noendtime() || $row->alldayevent() ? "" : $stop_time_midnightFix;
$blank[] = "";
$rawreplace["{{STARTDATE}}"] = $row->getUnixStartDate();
$rawreplace["{{ENDDATE}}"] = $row->getUnixEndDate();
$rawreplace["{{STARTTIME}}"] = $row->getUnixStartTime();
$rawreplace["{{ENDTIME}}"] = $row->getUnixEndTime();
$rawreplace["{{STARTTZ}}"] = $row->yup() . "-" . $row->mup() . "-" . $row->dup() . " " . $row->hup() . ":" . $row->minup() . ":" . $row->sup();
$rawreplace["{{ENDTZ}}"] = $row->ydn() . "-" . $row->mdn() . "-" . $row->ddn() . " " . $row->hdn() . ":" . $row->mindn() . ":" . $row->sdn();
示例7: DefaultLoadedFromTemplate
//.........这里部分代码省略.........
<?php
$search[] = "{{EDITDIALOG}}";
ob_start();
$view->eventManagementDialog($event, $mask);
$dialog = ob_get_clean();
$replace[] = $dialog;
$blank[] = "";
echo $dialog;
?>
</div>
<?php
$search[] = "{{EDITBUTTON}}";
$replace[] = ob_get_clean();
$blank[] = "";
} else {
$search[] = "{{EDITBUTTON}}";
$replace[] = "";
$blank[] = "";
$search[] = "{{EDITDIALOG}}";
$replace[] = "";
$blank[] = "";
}
$created = JevDate::getDate($event->created());
$search[] = "{{CREATED}}";
$replace[] = $created->toFormat(JText::_("DATE_FORMAT_CREATED"));
$blank[] = "";
if ($template_name == "icalevent.detail_body") {
$search[] = "{{REPEATSUMMARY}}";
$replace[] = $event->repeatSummary();
$blank[] = "";
$row = $event;
$start_date = JEventsHTML::getDateFormat($row->yup(), $row->mup(), $row->dup(), 0);
$start_time = JEVHelper::getTime($row->getUnixStartTime(), $row->hup(), $row->minup());
$stop_date = JEventsHTML::getDateFormat($row->ydn(), $row->mdn(), $row->ddn(), 0);
$stop_time = JEVHelper::getTime($row->getUnixEndTime(), $row->hdn(), $row->mindn());
$stop_time_midnightFix = $stop_time;
$stop_date_midnightFix = $stop_date;
if ($row->sdn() == 59 && $row->mindn() == 59) {
$stop_time_midnightFix = JEVHelper::getTime($row->getUnixEndTime() + 1, 0, 0);
$stop_date_midnightFix = JEventsHTML::getDateFormat($row->ydn(), $row->mdn(), $row->ddn() + 1, 0);
}
$search[] = "{{STARTDATE}}";
$replace[] = $start_date;
$blank[] = "";
$search[] = "{{ENDDATE}}";
$replace[] = $stop_date;
$blank[] = "";
$search[] = "{{STARTTIME}}";
$replace[] = $start_time;
$blank[] = "";
$search[] = "{{ENDTIME}}";
$replace[] = $stop_time_midnightFix;
$blank[] = "";
} else {
$row = $event;
$start_date = JEventsHTML::getDateFormat($row->yup(), $row->mup(), $row->dup(), 0);
$start_time = JEVHelper::getTime($row->getUnixStartTime(), $row->hup(), $row->minup());
$stop_date = JEventsHTML::getDateFormat($row->ydn(), $row->mdn(), $row->ddn(), 0);
$stop_time = JEVHelper::getTime($row->getUnixEndTime(), $row->hdn(), $row->mindn());
$stop_time_midnightFix = $stop_time;
$stop_date_midnightFix = $stop_date;
if ($row->sdn() == 59 && $row->mindn() == 59) {
$stop_time_midnightFix = JEVHelper::getTime($row->getUnixEndTime() + 1, 0, 0);
$stop_date_midnightFix = JEventsHTML::getDateFormat($row->ydn(), $row->mdn(), $row->ddn() + 1, 0);
}
示例8: DefaultViewEventRowNew
function DefaultViewEventRowNew($view, $row, $args = "")
{
$cfg = JEVConfig::getInstance();
$rowlink = $row->viewDetailLink($row->yup(), $row->mup(), $row->dup(), false);
$rowlink = JRoute::_($rowlink . $view->datamodel->getCatidsOutLink());
// I choost not to use $row->fgcolor
$fgcolor = "inherit";
$tmpTitle = $row->title();
/*
// [mic] if title is too long, cut 'em for display
if( JString::strlen( $row->title() ) >= 50 ){
$tmpTitle = JString::substr( $row->title(), 0, 50 ) . ' ...';
}
*/
$jevtask = JRequest::getString("jevtask");
$jevtask = str_replace(".listevents", "", $jevtask);
$showyeardate = $cfg->get("showyeardate", 0);
$times = "";
if ($showyeardate && $jevtask == "year" || $jevtask == "search.results" || $jevtask == "cat" || $jevtask == "range") {
$start_publish = $row->getUnixStartDate();
$stop_publish = $row->getUnixEndDate();
$start_date = JEventsHTML::getDateFormat($row->yup(), $row->mup(), $row->dup(), 0);
$start_time = JEVHelper::getTime($row->getUnixStartTime(), $row->hup(), $row->minup());
$stop_date = JEventsHTML::getDateFormat($row->ydn(), $row->mdn(), $row->ddn(), 0);
$stop_time = JEVHelper::getTime($row->getUnixEndTime(), $row->hdn(), $row->mindn());
if ($stop_publish == $start_publish) {
if ($row->noendtime()) {
$times = $start_time;
} else {
if ($row->alldayevent()) {
$times = "";
} else {
if ($start_time != $stop_time) {
$times = $start_time . ' - ' . $stop_time;
} else {
$times = $start_time;
}
}
}
$times = $start_date . " " . $times . "<br/>";
} else {
if ($row->noendtime()) {
$times = $start_time;
} else {
if ($start_time != $stop_time && !$row->alldayevent()) {
$times = $start_time . ' - ' . $stop_time;
}
}
$times = $start_date . ' - ' . $stop_date . " " . $times . "<br/>";
}
} else {
if (($jevtask == "day" || $jevtask == "week") && $row->starttime() != $row->endtime() && !$row->alldayevent()) {
$starttime = JEVHelper::getTime($row->getUnixStartTime(), $row->hup(), $row->minup());
$endtime = JEVHelper::getTime($row->getUnixEndTime(), $row->hdn(), $row->mindn());
if ($row->noendtime()) {
if ($showyeardate && $jevtask == "year") {
$times = $starttime . ' - ' . $endtime . ' ';
} else {
$times = $starttime . ' ';
}
} else {
$times = $starttime . ' - ' . $endtime . ' ';
}
}
}
echo $times;
?>
<a class="ev_link_row" href="<?php
echo $rowlink;
?>
" <?php
echo $args;
?>
style="color:<?php
echo $fgcolor;
?>
;" title="<?php
echo JEventsHTML::special($row->title());
?>
"><?php
echo $tmpTitle;
?>
</a>
<?php
if ($cfg->get('com_byview') == '1') {
echo JText::_('JEV_BY') . ' <i>' . $row->contactlink() . '</i>';
}
?>
<?php
}
示例9: DefaultRepeatSummary
function DefaultRepeatSummary($view, $event)
{
$sum = "";
if (!isset($event->start_date)) {
$event_up = new JEventDate($event->publish_up());
// NB If you set language file date/time formatting then you can use a specific format string here (using strftime formats) e.g.
// $event->start_date = JEventsHTML::getDateFormat($event_up->year, $event_up->month, $event_up->day, "%Y-%m-%d");
$event->start_date = JEventsHTML::getDateFormat($event_up->year, $event_up->month, $event_up->day, 0);
$event->start_time = JEVHelper::getTime($event->getUnixStartTime());
$event_down = new JEventDate($event->publish_down());
$event->stop_date = JEventsHTML::getDateFormat($event_down->year, $event_down->month, $event_down->day, 0);
$event->stop_time = JEVHelper::getTime($event->getUnixEndTime());
$event->stop_time_midnightFix = $event->stop_time;
$event->stop_date_midnightFix = $event->stop_date;
if ($event_down->second == 59) {
$event->stop_time_midnightFix = JEVHelper::getTime($event->getUnixEndTime() + 1);
$event->stop_date_midnightFix = JEventsHTML::getDateFormat($event_down->year, $event_down->month, $event_down->day + 1, 0);
}
}
if ($event->alldayevent()) {
if ($event->start_date == $event->stop_date) {
$sum .= $event->start_date;
} else {
$sum .= JText::_('JEV_FROM') . ' ' . $event->start_date . '<br />' . JText::_('JEV_TO') . ' ' . $event->stop_date . '<br/>';
}
} else {
if ($event->start_date == $event->stop_date) {
if ($event->noendtime()) {
$sum .= $event->start_date . ', ' . $event->start_time . '<br/>';
} else {
if ($event->start_time != $event->stop_time && !$event->alldayevent()) {
$sum .= $event->start_date . ', ' . $event->start_time . ' - ' . $event->stop_time_midnightFix . '<br/>';
} else {
if ($event->start_time == $event->stop_time && !$event->alldayevent()) {
$sum .= $event->start_date . ', ' . $event->start_time . '<br/>';
} else {
$sum .= $event->start_date . '<br/>';
}
}
}
} else {
// recurring events should have time related to recurrance not range of dates
if ($event->noendtime() && !($event->reccurtype() > 0)) {
$sum .= $event->start_date . ', ' . $event->start_time . '<br/>' . JText::_('JEV_TO') . ' ' . $event->stop_date . '<br/>';
} else {
if ($event->start_time != $event->stop_time && !($event->reccurtype() > 0)) {
$sum .= JText::_('JEV_FROM') . ' ' . $event->start_date . ' - ' . $event->start_time . '<br />' . JText::_('JEV_TO') . ' ' . $event->stop_date . ' - ' . $event->stop_time_midnightFix . '<br/>';
} else {
$sum .= JText::_('JEV_FROM') . ' ' . $event->start_date . '<br />' . JText::_('JEV_TO') . ' ' . $event->stop_date . '<br/>';
}
}
}
}
if ($event->_freq == "none") {
return $sum;
}
if ($event->_eventdetail_id != $event->_detail_id) {
$sum .= "<div class='ev_repeatexception'>" . JText::_('JEV_REPEATEXCEPTION') . "</div>";
}
return $sum;
}