当前位置: 首页>>代码示例>>PHP>>正文


PHP Formatter::formatCompleteDate方法代码示例

本文整理汇总了PHP中Formatter::formatCompleteDate方法的典型用法代码示例。如果您正苦于以下问题:PHP Formatter::formatCompleteDate方法的具体用法?PHP Formatter::formatCompleteDate怎么用?PHP Formatter::formatCompleteDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Formatter的用法示例。


在下文中一共展示了Formatter::formatCompleteDate方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionViewSessionHistory

 /**
  * An AJAX called function which will return HTML containing a full history
  * of a particular session, from login to logout.
  * @param $id The ID of the session
  */
 public function actionViewSessionHistory($id)
 {
     $sessions = X2Model::model('SessionLog')->findAllByAttributes(array('sessionId' => $id));
     $firstTimestamp = 0;
     $lastTimestamp = 0;
     $str = "<table class='items'><thead><tr><th>User</th><th>Status</th><th>Timestamp</th></tr></thead>";
     foreach ($sessions as $session) {
         $str .= "<tr>";
         $str .= "<td>" . User::getUserLinks($session->user) . "</td>";
         $str .= "<td>" . SessionLog::parseStatus($session->status) . "</td>";
         $str .= "<td>" . Formatter::formatCompleteDate($session->timestamp) . "</td>";
         $str .= "</tr>";
     }
     $str .= "</table>";
     echo $str;
 }
开发者ID:xl602,项目名称:X2CRM,代码行数:21,代码来源:AdminController.php

示例2: renderDateTime

 protected function renderDateTime($field, $makeLinks, $textOnly, $encode)
 {
     $fieldName = $field->fieldName;
     if (empty($this->owner->{$fieldName})) {
         return ' ';
     } elseif (is_numeric($this->owner->{$fieldName})) {
         return Formatter::formatCompleteDate($this->owner->{$fieldName});
     } else {
         return $this->render($this->owner->{$fieldName}, $encode);
     }
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:11,代码来源:FieldFormatter.php

示例3: elseif

        echo "</span>";
        echo "<div class='field-value'>";
        echo "<span style='color:grey'>" . $model->getAttributeLabel('dueDate', true) . ':' . " </span>" . '<b>' . $model->formatDueDate() . '</b>';
        echo "</div>";
        if (in_array($model->type, array('event', 'time', 'call'))) {
            echo "<div class='field-value'>";
            echo "<span style='color:grey'>" . $model->getAttributeLabel('completeDate', true) . ':' . " </span>" . '<b>' . Formatter::formatDateTime($model->completeDate) . '</b>';
            echo "</div>";
        }
    } elseif (!empty($model->createDate)) {
        echo Yii::t('actions', 'Created:') . " " . Formatter::formatLongDateTime($model->createDate) . '</b>';
    } else {
        echo "&nbsp;";
    }
} else {
    echo Yii::t('actions', 'Completed {date}', array('{date}' => Formatter::formatCompleteDate($model->completeDate)));
}
?>
                </span>
                <span>
                    <span id="controls">
                        <?php 
if (Yii::app()->user->checkAccess('ActionsComplete', array('X2Model' => $model))) {
    if ($model->complete != 'Yes') {
        ?>
                                    <div class="control-button icon complete-button"
                                     title="<?php 
        echo Yii::t('actions', 'Complete action');
        ?>
">
                                    </div>
开发者ID:dsyman2,项目名称:X2CRM,代码行数:31,代码来源:_viewFrame.php

示例4: elseif

        }
    } else {
        echo Formatter::formatLongDateTime($data->dueDate);
        if ($data->completeDate) {
            echo ' - ' . Formatter::formatLongDateTime($data->completeDate);
        }
    }
    echo '</b>';
} elseif ($data->type == 'call') {
    echo Yii::t('actions', 'Call:') . ' ' . ($data->completeDate == $data->dueDate ? Formatter::formatCompleteDate($data->completeDate) : Formatter::formatTimeInterval($data->dueDate, $data->completeDate, '{start}; {decHours} ' . Yii::t('app', 'hours')));
} elseif ($data->type == 'webactivity') {
    echo Yii::t('actions', 'This contact visited your website');
} elseif ($data->type == 'time') {
    echo Formatter::formatTimeInterval($data->dueDate, $data->dueDate + $data->timeSpent);
} else {
    $timeFormat = Formatter::formatCompleteDate($data->getRelevantTimestamp());
    if ($data->type == 'attachment') {
        if ($data->completedBy === 'Email') {
            $label = 'Email Message:';
        } else {
            $label = 'Attachment:';
        }
    } elseif ($data->type == 'quotes') {
        $label = 'Quote:';
    } elseif (in_array($data->type, array('email', 'emailFrom', 'email_quote', 'email_invoice'))) {
        $label = 'Email Message:';
    } elseif (in_array($data->type, array('emailOpened', 'emailOpened_quote', 'email_opened_invoice'))) {
        $label = 'Email Opened:';
    }
    if (isset($label)) {
        echo Yii::t('actions', $label) . ' ';
开发者ID:dsyman2,项目名称:X2CRM,代码行数:31,代码来源:_view.php

示例5: dynamicDate

 public static function dynamicDate($date)
 {
     return '<span title="' . CHtml::encode(Formatter::formatCompleteDate($date)) . '">' . CHtml::encode(Formatter::formatDateDynamic($date)) . '</span>';
 }
开发者ID:shuvro35,项目名称:X2CRM,代码行数:4,代码来源:X2Html.php


注:本文中的Formatter::formatCompleteDate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。