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


PHP JDate::getWeek方法代碼示例

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


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

示例1: JDate

                     <td class="mmList1">' . $medlem["id"] . '</td>
                     <td class="mmList2">' . $medlem["aNamn"] . '</td>
                     <td class="mmList2">' . $medlem["fNamn"] . ' ' . $medlem["eNamn"] . '</td>
                     <td class="mmList1">' . $medlem["epost"] . '</td>
                     <td class="mmList2">' . $medlem["steg"] . '</td>
                     <td class="mmList1">' . $medlem["companyname"] . '</td>
                     <td class="mmList2">' . $medlem["startdatum"] . ' - ' . $medlem["slutdatum"] . '</td>                       
                     <td class="mmList1" id="win-date-' . $medlem["id"] . '">' . $medlem["veckotavling_status"] . '</td>
                     <td class="mmList2" id="win-date-' . $medlem["id"] . '">' . $medlem["veckotavling_week"] . '</td>
                     <td class="mmList1" id="win-date-' . $medlem["id"] . '">' . $medlem["veckotavling_datum"] . '</td>
                   </tr>';
}
$winnertable .= '</table>';
echo $winnertable;
$jdate = new JDate($date);
$week = $jdate->getWeek();
if (count($winners) > 0) {
    $att = null;
    $emaillist = '';
    $winnerIds = '';
    $namelist = '<br/>';
    $html = "<h2>VINNARE VECKA {$week}</h2><h2>";
    foreach ($winners as $id => $medlem) {
        $att .= "\n";
        $html .= '<a href="/pages/profil.php?mid=' . $medlem["id"] . '">' . $medlem["aNamn"] . '</a><br />';
        $emaillist .= $medlem["epost"] . ", ";
        $winnerIds .= $medlem["id"] . ", ";
        $namelist .= $medlem["fNamn"] . ' ' . $medlem["eNamn"] . ' - ' . $medlem["epost"] . ' - ' . $medlem["steg"] . '<br />';
    }
    $html .= "</h2>";
    $winnerIds = substr($winnerIds, 0, strlen($winnerIds) - 2);
開發者ID:krillo,項目名稱:motiomera,代碼行數:31,代碼來源:getWeekWinners.php

示例2: updateVeckoVinnare

 /**
  * Update the members to be a week winner
  * Krillo 2012-09-10
  * 
  * @global $db $db
  * @param type $idArray
  * @return type 
  */
 public static function updateVeckoVinnare($idArray, $date)
 {
     global $db;
     $jDate = new JDate($date);
     $idArray = implode(',', $idArray);
     $sql = "UPDATE mm_medlem SET veckotavling_status = 1, veckotavling_week = '" . $jDate->getYear() . '-' . $jDate->getWeek() . "' WHERE id IN ({$idArray});";
     $status = $db->query($sql);
     return $status;
 }
開發者ID:krillo,項目名稱:motiomera,代碼行數:17,代碼來源:Medlem.php

示例3: JDate

<?php

require 'jdate.class.php';
$date = "2010-01-01 00:12:12";
$udate = 1262300400;
$d = new JDate();
print_r($d->getWeek($date));
print_r($d->getWeek($udate));
print_r($d->getWeek());
開發者ID:jonasbjork,項目名稱:jtk,代碼行數:9,代碼來源:jdate.test.php


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