本文整理汇总了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);
示例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;
}
示例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());