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


PHP Helper::convertDateSimple方法代码示例

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


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

示例1: if

<div id="data_entry_left_right_wrapper">

<div id="data_entry_left">
<?php if ($num_pages > 0) {?>
    <?php $form=$this->beginWidget('CActiveForm', array (
        'id'=>'je_data_entry_form',
        'htmlOptions'=>array(
            'class'=>'data_entry_form',
        ),
    )); ?>
    <fieldset>
        <div class="group">
            <?php
            // convert date string to view format
            if (preg_match('/^\d{4}\-\d{2}\-\d{2}$/', $je->JE_Date)) {
                $je->JE_Date = Helper::convertDateSimple($je->JE_Date);
            }
            ?>
            <label for="Journals_JE_Date"><span class="red">*</span> Journal Date</label>
            <?php echo $form->textField($je,'JE_Date'); ?>
            <?php echo $form->error($je,'JE_Date'); ?>
            <?php
            if (!isset($je['_errors']["JE_Date"])) {
                echo '<div class="errorMessage grey">Correct date format: mm/dd/yyyy!</div>';
            }
            ?>
        </div>
        <div class="group">
            <?php
            if ($je->JE_Number == '0') {
                $je->JE_Number = '';
开发者ID:ranvijayj,项目名称:htmlasa,代码行数:31,代码来源:jes_entry.php

示例2: if

<div id="data_entry_left_right_wrapper">

<div id="data_entry_left">
<?php if ($num_pages > 0) {?>
    <?php $form=$this->beginWidget('CActiveForm', array (
        'id'=>'payroll_data_entry_form',
        'htmlOptions'=>array(
            'class'=>'data_entry_form',
        ),
    )); ?>
    <fieldset>
        <div class="group">
            <?php
            // convert date string to view format
            if (preg_match('/^\d{4}\-\d{2}\-\d{2}$/', $payroll->Week_Ending)) {
                $payroll->Week_Ending = Helper::convertDateSimple($payroll->Week_Ending);
            }
            ?>
            <label for="Payrolls_Week_Ending"><span class="red">*</span> Week Ending</label>
            <?php echo $form->textField($payroll,'Week_Ending'); ?>
            <?php echo $form->error($payroll,'Week_Ending'); ?>
            <?php
            if (!isset($payroll['_errors']["Week_Ending"])) {
                echo '<div class="errorMessage grey">Correct format: mm/dd/yyyy!</div>';
            }
            ?>
        </div>
        <div class="group">
            <label for="Payrolls_Payroll_Type_ID"><span class="red">*</span> Type</label>
            <?php  echo $form->dropDownList($payroll,'Payroll_Type_ID', array('0' => 'Unknown Payroll Type') + $payrollTypes); ?>
            <?php echo $form->error($payroll,'Payroll_Type_ID'); ?>
开发者ID:ranvijayj,项目名称:htmlasa,代码行数:31,代码来源:payrolls_entry.php

示例3: array

 </div>
 <div class="group">
     <label for="Pos_Vendor_ID"><span class="red">*</span> Vendor</label>
     <?php  echo $form->dropDownList($po,'Vendor_ID', array('0' => 'Unknown Vendor') + $vendorsCP); ?>
     <?php echo $form->error($po,'Vendor_ID'); ?>
 </div>
 <div class="group">
     <label for="Pos_PO_Account_Number">Account Num</label>
     <?php echo $form->textField($po,'PO_Account_Number'); ?>
     <?php echo $form->error($po,'PO_Account_Number'); ?>
 </div>
 <div class="group">
     <?php
     // convert date string to view format
     if (preg_match('/^\d{4}\-\d{2}\-\d{2}$/', $po->PO_Date)) {
         $po->PO_Date = Helper::convertDateSimple($po->PO_Date);
     }
     ?>
     <label for="Pos_PO_Date"><span class="red">*</span> Date</label>
     <?php echo $form->textField($po,'PO_Date'); ?>
     <?php echo $form->error($po,'PO_Date'); ?>
     <?php
     if (!isset($ap['_errors']["PO_Date"])) {
         echo '<div class="errorMessage grey">Correct date format: mm/dd/yyyy!</div>';
     }
     ?>
 </div>
 <div class="group">
     <label for="Pos_PO_Subtotal"><span class="red">*</span> Subtotal</label>
     <?php echo $form->textField($po,'PO_Subtotal', array('class' => 'dollar_fields base_fields')); ?>
     <?php echo $form->error($po,'PO_Subtotal'); ?>
开发者ID:ranvijayj,项目名称:htmlasa,代码行数:31,代码来源:po_entry.php

示例4:

     }
     ?>
     <label for="Aps_Invoice_Date"><span class="red">*</span> Inv. Date</label>
     <?php echo $form->textField($ap,'Invoice_Date'); ?>
     <?php echo $form->error($ap,'Invoice_Date'); ?>
     <?php
     if (!isset($ap['_errors']["Invoice_Date"])) {
         echo '<div class="errorMessage grey">Correct date format: mm/dd/yyyy!</div>';
     }
     ?>
 </div>
 <div class="group">
     <?php
     // convert date string to view format
     if (preg_match('/^\d{4}\-\d{2}\-\d{2}$/', $ap->Invoice_Due_Date)) {
         $ap->Invoice_Due_Date = Helper::convertDateSimple($ap->Invoice_Due_Date);
     }
     ?>
     <label for="Aps_Invoice_Due_Date">Inv. Due Date</label>
     <?php echo $form->textField($ap,'Invoice_Due_Date',array('data-term'=>$due_date_term)); ?>
     <?php echo $form->error($ap,'Invoice_Due_Date'); ?>
     <?php
     if (!isset($ap['_errors']["Invoice_Due_Date"])) {
         echo '<div class="errorMessage grey">Correct date format: mm/dd/yyyy!</div>';
     }
     ?>
 </div>
 <div class="group">
     <label for="Aps_Invoice_Amount"><span class="red">*</span> Inv. Amount</label>
     <?php echo $form->textField($ap,'Invoice_Amount'); ?>
     <?php echo $form->error($ap,'Invoice_Amount'); ?>
开发者ID:ranvijayj,项目名称:htmlasa,代码行数:31,代码来源:ap_dataentry_widget.php

示例5: isset

        <div style="margin-left: 230px;position: relative; top:-10px;"> <a href="#" class="add_new_vendor"> Add new vendor </a> </div>
        <input id="fileupload_add_block" type="file" name="files[]" style="display: none;">
        <script src="<?php echo Yii::app()->request->baseUrl.'/js/jupload/vendor/jquery.ui.widget.js'?>" > </script>
        <script src="<?php echo Yii::app()->request->baseUrl.'/js/jupload/jquery.fileupload.js'?>" > </script>


    </div>
    <div class="right po_creating_top_right">
        <fieldset>
            <div class="group">
                <label>Number:</label>
                <span class="limited_width"><?php echo $po->PO_Number; ?></span>
            </div>
            <div class="group">
                <label>Date:</label>
                <span class="limited_width"><?php echo Helper::convertDateSimple($po->PO_Date); ?></span>
            </div>
            <div class="group">
                <label>Job Name:</label>
                <span class="limited_width"><?php echo isset($poFormatting->PO_Format_Job_Name) ? CHtml::encode($poFormatting->PO_Format_Job_Name) : ''; ?></span>
            </div>
            <div class="group">
                <?php echo $form->label($po,'PO_Account_Number'); ?>
                <?php echo $form->textField($po,'PO_Account_Number'); ?>
                <?php echo $form->error($po,'PO_Account_Number'); ?>
            </div>
            <div class="group">
                <?php echo $form->label($po,'Payment_Type'); ?>
                <?php echo $form->dropDownList($po,'Payment_Type', array('0' => 'Unknown Payment Type') + $this->paymentTypes); ?>
                <?php echo $form->error($po,'Payment_Type'); ?>
            </div>
开发者ID:ranvijayj,项目名称:htmlasa,代码行数:31,代码来源:create.php

示例6: array

         'readonly'=> $payment->Void,
         'class'=>'dollar_fields'
     )); ?>
     <?php echo $form->error($payment,'Payment_Amount'); ?>
     <?php  echo '<div class="warningMessage"></div>';?>
 </div>
 <div class="group">
     <label for="Void">Void payment</label>
     <?php echo $form->checkBox($payment,'Void'); ?>
     <?php echo $form->error($payment,'Void'); ?>
 </div>
 <div class="group">
     <?php
     // convert date string to view format
     if (preg_match('/^\d{4}\-\d{2}\-\d{2}$/', $payment->Payment_Check_Date)) {
         $payment->Payment_Check_Date = Helper::convertDateSimple($payment->Payment_Check_Date);
     }
     ?>
     <label for="Payments_Payment_Check_Date"><span class="red">*</span> Pmt. Date</label>
     <?php echo $form->textField($payment,'Payment_Check_Date'); ?>
     <?php echo $form->error($payment,'Payment_Check_Date'); ?>
     <?php
     if (!isset($payment['_errors']["Payment_Check_Date"])) {
         echo '<div class="errorMessage grey">Correct date format: mm/dd/yyyy!</div>';
     }
     ?>
 </div>
 <div class="group">
     <label for="Acct_Number">Acct. Number</label>
     <?php  echo $form->dropDownList($payment,'Account_Num_ID', array('0' => 'Unknown Acct. Number') + $acctNumbs); ?>
     <?php echo $form->error($payment,'Account_Num_ID'); ?>
开发者ID:ranvijayj,项目名称:htmlasa,代码行数:31,代码来源:payments_entry.php

示例7:

 </div>
 <div class="group">
     <?php
     if ($pc->Envelope_Total == '0.00') {
         $pc->Envelope_Total = '';
     }
     ?>
     <label for="Pcs_Envelope_Total"><span class="red">*</span> Envelope Total</label>
     <?php echo $form->textField($pc,'Envelope_Total'); ?>
     <?php echo $form->error($pc,'Envelope_Total'); ?>
 </div>
 <div class="group">
     <?php
         // convert date string to view format
         if (preg_match('/^\d{4}\-\d{2}\-\d{2}$/', $pc->Envelope_Date)) {
             $pc->Envelope_Date = Helper::convertDateSimple($pc->Envelope_Date);
         }
     ?>
     <label for="Pcs_Envelope_Date"><span class="red">*</span> Envelope Date</label>
     <?php echo $form->textField($pc,'Envelope_Date'); ?>
     <?php echo $form->error($pc,'Envelope_Date'); ?>
     <?php
     if (!isset($pc['_errors']["Envelope_Date"])) {
         echo '<div class="errorMessage grey">Correct date format: mm/dd/yyyy!</div>';
     }
     ?>
 </div>
 <?php echo $form->hiddenField($pc,'PC_ID'); ?>
 <?php echo $form->hiddenField($pc,'Document_ID'); ?>
 <input type="hidden" value="true" name="pc_data_entry_form_values">
 <div class="center">
开发者ID:ranvijayj,项目名称:htmlasa,代码行数:31,代码来源:pcs_entry.php

示例8: array

            ?>
            <label for="W9_Signed"><span class="red">*</span> Signed</label>
            <?php echo $form->checkBox($w9,'Signed', $htmlOptions); ?>
            <?php echo $form->error($w9,'Signed'); ?>
        </div>
        <div class="group">
            <?php
            $htmlOptions = array();
            if ($w9->Verified == 1 && Yii::app()->user->userType != Users::DB_ADMIN) {
                $htmlOptions = array('disabled'=>'disabled');
            }

            // convert date string to view format
            if (preg_match('/^\d{4}\-\d{2}\-\d{2}$/', $w9->Signature_Date)) {

                $w9->Signature_Date = Helper::convertDateSimple($w9->Signature_Date);
            }
           /* echo "Date time explanation<br> ";
            echo "<br>Row w9 signature date<br> ".$w9->Signature_Date."<br>";

            //$date = date("Y-m-d H:i:s", strtotime($w9->Signature_Date) - date('Z') + Yii::app()->user->userTimezoneOffset);
            $date = date("Y-m-d H:i:s", strtotime($w9->Signature_Date));
            echo "<br>Full format signature date full format <br>  ".$date."<br>";

            $date = date('Z');
            echo "<br>Timezone offset offset from GMT ".$date."<br>";

            $date = Yii::app()->user->userTimezoneOffset;
            echo "<br>User Timezone offset app()->user->userTimezoneOffset  ".$date."<br>";

            $date = date("Y-m-d H:i:s", strtotime($w9->Signature_Date) + date('Z') - Yii::app()->user->userTimezoneOffset);
开发者ID:ranvijayj,项目名称:htmlasa,代码行数:31,代码来源:w9_entry.php

示例9: generateBatchExcel

    /**
     * Generate batch in Excel format
     * @param $exportRows
     * @param $batchFormat
     * @return string
     */
    public static function generateBatchExcel($exportRows, $batchFormat)
    {
        $phpExcelPath = Yii::getPathOfAlias('ext.phpexcel.Classes');
        new Helper();
        spl_autoload_unregister(array('YiiBase','autoload')); //needed for correct usage of PHPExcel
        include($phpExcelPath . DIRECTORY_SEPARATOR . 'PHPExcel.php');
        $phpexcel = new PHPExcel();

        if ($batchFormat == self::MAS90) {
            $page = $phpexcel->setActiveSheetIndex(0);
            $page->setCellValue("A1", "VendorID:");
            $page->setCellValue("B1", "InvNum:");
            $page->setCellValue("C1", "InvDate");
            $page->setCellValue("D1", "InvAmt");
            $page->setCellValue("E1", "InvDesc");
            $page->setCellValue("F1", "GLCode");
            $page->setCellValue("G1", "GLAmt");
            $page->setCellValue("H1", "GLDesc");

            $page->getStyle('A1')->getFont()->setBold(true);
            $page->getStyle('B1')->getFont()->setBold(true);
            $page->getStyle('C1')->getFont()->setBold(true);
            $page->getStyle('D1')->getFont()->setBold(true);
            $page->getStyle('E1')->getFont()->setBold(true);
            $page->getStyle('F1')->getFont()->setBold(true);
            $page->getStyle('G1')->getFont()->setBold(true);
            $page->getStyle('H1')->getFont()->setBold(true);
            $page->getColumnDimension('A')->setAutoSize(true);
            $page->getColumnDimension('B')->setAutoSize(true);
            $page->getColumnDimension('C')->setAutoSize(true);
            $page->getColumnDimension('D')->setAutoSize(true);
            $page->getColumnDimension('E')->setAutoSize(true);
            $page->getColumnDimension('F')->setAutoSize(true);
            $page->getColumnDimension('G')->setAutoSize(true);
            $page->getColumnDimension('H')->setAutoSize(true);

            $x=2;
            foreach($exportRows as $row) {
                $page->setCellValue("A".$x,$row['VendorID']);
                $page->setCellValue("B".$x,$row['InvNum']);
                $page->setCellValue("C".$x,Helper::convertDateSimple($row['InvDate']));
                $page->setCellValue("D".$x,$row['InvAmt']);
                $page->setCellValue("E".$x,$row['InvDesc']);
                $page->setCellValue("F".$x,$row['GLCode']);
                $page->setCellValue("G".$x,$row['GLAmt']);
                $page->setCellValue("H".$x,$row['GLDesc']);
                $x++;
            }
        }

        $objWriter = PHPExcel_IOFactory::createWriter($phpexcel, 'Excel2007');
        spl_autoload_register(array('YiiBase','autoload'));
        $path=Helper::createDirectory('batches');// creates directory "protected/data/batches" if not exists
        $filename = $path.'/'."Batch_Excel". date('Y_m_d_H_i_s') . ".xlsx";
        $objWriter->save($filename);

        return $filename;
    }
开发者ID:ranvijayj,项目名称:htmlasa,代码行数:64,代码来源:Batches.php


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