当前位置: 首页>>代码示例>>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;未经允许,请勿转载。