當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DateHelper::toDateFormat方法代碼示例

本文整理匯總了PHP中DateHelper::toDateFormat方法的典型用法代碼示例。如果您正苦於以下問題:PHP DateHelper::toDateFormat方法的具體用法?PHP DateHelper::toDateFormat怎麽用?PHP DateHelper::toDateFormat使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DateHelper的用法示例。


在下文中一共展示了DateHelper::toDateFormat方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

                        <?php 
echo $form->error($model, 'id_type');
?>

                    </div>
                </div>

                <div class="in-row clearfix pass_expiry_date">
                    <!--<label class="lb">Pass Expiry Date <span class="require">*</span> :</label>-->
                    <?php 
echo $form->labelEx($model, 'pass_expiry_date', array('class' => 'lb'));
?>

                    <?php 
if ($model->pass_expiry_date != '') {
    $model->pass_expiry_date = DateHelper::toDateFormat($model->pass_expiry_date);
}
?>

                    <div class="group-4">
                        <?php 
$this->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $model, 'attribute' => 'pass_expiry_date', 'options' => array('showAnim' => 'fold', 'dateFormat' => ActiveRecord::getDateFormatJquery(), 'changeMonth' => true, 'changeYear' => true, 'showOn' => 'button', 'buttonImage' => Yii::app()->theme->baseUrl . '/admin/images/icon_calendar_r.gif', 'buttonImageOnly' => true), 'htmlOptions' => array('class' => 'w-16', 'style' => 'height:20px;width:245px;margin-left:3px;')));
?>

                        <?php 
echo $form->error($model, 'pass_expiry_date');
?>

                    </div>
                </div>
開發者ID:jasonhai,項目名稱:onehome,代碼行數:30,代碼來源:myprofile_form.php

示例2: array

if (Yii::app()->user->hasFlash('successUpdate')) {
    ?>
    <div class="info" style="widows:600px;height:50px; color:#FF0000;font-weight:bold;text-align:center; font-size:24px;margin-top:30px;">
        <?php 
    echo Yii::app()->user->getFlash('successUpdate');
    ?>
    </div>
<?php 
}
?>

<?php 
$this->breadcrumbs = array('Users' => array('index'), $model->username);
if ($model->id != Yii::app()->user->id) {
    $this->menu = array(array('label' => 'List Users', 'url' => array('index')), array('label' => 'Create Member', 'url' => array('create')), array('label' => 'Update Member', 'url' => array('update', 'id' => $model->id)), array('label' => 'Delete Member', 'url' => array('delete'), 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?')));
} else {
    $this->menu = array(array('label' => 'List Users', 'url' => array('index')), array('label' => 'Create Member', 'url' => array('create')), array('label' => 'Update Member', 'url' => array('update', 'id' => $model->id)));
}
$address = '';
$address .= '<p>' . nl2br($model->address) . '</p>';
?>
 

<h1>View User: <?php 
echo $model->username;
?>
</h1>

<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array(array('label' => 'Full Name', 'value' => $model->client_salutation . ' ' . $model->username), 'email', 'phone', array('name' => 'created_date', 'value' => $model->created_date != "0000-00-00 00:00:00" ? DateHelper::toDateFormat($model->created_date) : "", 'htmlOptions' => array('style' => 'text-align:center;')), array('name' => 'Country', 'value' => $model->area_code_id != "" ? $model->area_code->area_name : "", 'htmlOptions' => array('style' => 'text-align:center;')), array('name' => 'Address', 'value' => $address, 'type' => 'raw'), 'client_type', 'client_designation', 'company_name', 'client_department', 'client_mobile', 'status:status')));
開發者ID:jasonhai,項目名稱:onehome,代碼行數:30,代碼來源:view.php


注:本文中的DateHelper::toDateFormat方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。