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


PHP Formatter::formatLongDate方法代码示例

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


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

示例1: renderDate

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

示例2:

</th>
		</tr>
		<tr>
			<td>
				<?php 
echo Formatter::formatLongDate($quote->createDate);
?>
			</td>
			<td>
				<?php 
echo Formatter::formatLongDate($quote->lastUpdated);
?>
			</td>
			<td>
				<?php 
echo Formatter::formatLongDate($quote->expirationDate);
?>
			</td>
		</tr>
		<tr>
			<th><?php 
echo Yii::t('quotes', 'Created By');
?>
</th>
			<th><?php 
echo Yii::t('quotes', 'Updated By');
?>
</th>
			<th><?php 
echo Yii::t('quotes', 'Status');
?>
开发者ID:tymiles003,项目名称:X2CRM,代码行数:31,代码来源:viewQuotes.php

示例3: elseif

            echo Yii::t('actions', 'Due:') . " </span>" . Actions::parseStatus($data->dueDate) . '</b>';
        } elseif (!empty($data->createDate)) {
            echo Yii::t('actions', 'Created:') . " </span>" . Formatter::formatLongDateTime($data->createDate) . '</b>';
        } else {
            echo "&nbsp;";
        }
    }
} elseif ($data->type == 'workflow') {
    // $actionData = explode(':',$data->actionDescription);
    echo Yii::t('workflow', 'Process:') . '<b> ' . $data->workflow->name . '/' . $data->workflowStage->name . '</b> ';
} elseif ($data->type == 'event') {
    echo '<b>' . CHtml::link(Yii::t('calendar', 'Event') . ': ', '#', array('class' => 'action-frame-link', 'data-action-id' => $data->id));
    if ($data->allDay) {
        echo Formatter::formatLongDate($data->dueDate);
        if ($data->completeDate) {
            echo ' - ' . Formatter::formatLongDate($data->completeDate);
        }
    } 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 {
开发者ID:dsyman2,项目名称:X2CRM,代码行数:31,代码来源:_view.php

示例4:

 <strong><?php 
            echo $contact->renderAttribute('dealvalue');
            ?>
</strong><br />
    <?php 
        }
        ?>

    <?php 
        if (isset($contact->closedate) && $contact->closedate != "") {
            ?>
        <?php 
            echo Yii::t('contacts', 'Close Date') . ": ";
            ?>
 <strong><?php 
            echo Formatter::formatLongDate($contact->closedate);
            ?>
</strong><br />
    <?php 
        }
        ?>

    <?php 
        if (isset($contact->dealstatus) && $contact->dealstatus != "") {
            ?>
        <?php 
            echo Yii::t('contacts', 'Deal Status') . ": ";
            ?>
 <strong><?php 
            echo $contact->renderAttribute('dealstatus');
            ?>
开发者ID:tymiles003,项目名称:X2CRM,代码行数:31,代码来源:qtip.php


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