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


PHP date::year方法代碼示例

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


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

示例1: main

    public function main()
    {
        ?>
		<div id="main">
			<div id="reports-new">
				<div class="ui error form segment square-corners no-shadow">
					<div class="three fields">
						<div class="field">
							<label>Год набора</label>
							<input id="year" name="year" placeholder="<?php 
        echo date::year();
        ?>
" type="text" value="<?php 
        echo $this->report->year;
        ?>
">
						</div>

						<div class="field">
							<label>Срок обучения (лет)</label>
							<input id="duration" name="duration" placeholder="4" type="text" value="<?php 
        echo $this->report->duration;
        ?>
" onchange="calendar.update();">
						</div>

						<div class="field">
							<label>ФИО ректора</label>
							<input id="rector" name="rector" placeholder="М.П. Батура" type="text" value="<?php 
        echo $this->report->rector;
        ?>
">
						</div>
					</div>

					<div class="field">
						<label>Регистрационный номер учебного плана</label>
						<input id="registration_number" name="registration_number" placeholder="2014.09.20/000" type="text" value="<?php 
        echo $this->report->registration_number;
        ?>
">
					</div>

					<div class="field">
						<div class="ui fluid selection dropdown">
							<div class="default text">Форма обучения</div>
							<i class="dropdown icon"></i>
							<input type="hidden" id="training_form_id" name="training_form_id" value="<?php 
        echo $this->report->training_form_id;
        ?>
">
							<div class="menu">
								<?php 
        $training_forms = training_forms::get();
        if ($training_forms) {
            foreach ($training_forms as $training_form) {
                ?>
											<div class="item" data-value="<?php 
                echo $training_form->id;
                ?>
"><?php 
                echo html::escape($training_form->name);
                ?>
</div>
											<?php 
            }
        }
        ?>
							</div>
						</div>
					</div>

					<div class="field">
						<div class="ui fluid selection dropdown">
							<div class="default text">Квалификация специалиста</div>
							<i class="dropdown icon"></i>
							<input type="hidden" id="qualification_id" name="qualification_id" value="<?php 
        echo $this->report->qualification_id;
        ?>
">
							<div class="menu">
								<?php 
        $qualifications = qualifications::get();
        if ($qualifications) {
            foreach ($qualifications as $qualification) {
                ?>
											<div class="item" data-value="<?php 
                echo $qualification->id;
                ?>
"><?php 
                echo html::escape($qualification->name);
                ?>
</div>
											<?php 
            }
        }
        ?>
							</div>
						</div>
					</div>
//.........這裏部分代碼省略.........
開發者ID:wild-stas,項目名稱:rude-univ,代碼行數:101,代碼來源:rude-template-reports-edit.php

示例2: last_day_of_week

 public static function last_day_of_week($year = null, $month = null, $week = null, $format = 'j')
 {
     if ($year === null) {
         $year = date::year();
     }
     if ($month === null) {
         $month = date::month();
     }
     if ($week === null) {
         $week = date::week();
     }
     if ($week == date::weeks_in_month($year, $month)) {
         return date::last_day_of_month($year, $month, $format);
     }
     if ($week > date::weeks_in_month($year, $month)) {
         return 0;
     }
     return date($format, strtotime('this sunday', date::first_day_of_week($year, $month, $week, 'U')));
 }
開發者ID:ThisNameWasFree,項目名稱:rude-univ,代碼行數:19,代碼來源:rude-date.php


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