本文整理匯總了PHP中valid::week方法的典型用法代碼示例。如果您正苦於以下問題:PHP valid::week方法的具體用法?PHP valid::week怎麽用?PHP valid::week使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類valid
的用法示例。
在下文中一共展示了valid::week方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: week
/**
* Week view
*
* @param int $year
* @param int $week
*/
public function week($year, $week)
{
$this->tab_id = 'browse';
if (valid::year($year) && valid::week($week)) {
$this->type = 'week';
$this->date->setISODate($year, $week);
// check for new years fix
if ($week == 1) {
$saturday = new DateTime();
$saturday->setISODate($year, $week, 6);
$this->date = $saturday;
}
$this->page_title = text::title(__('Week') . ' ' . $this->date->format('W/Y'));
$this->breadcrumb[] = html::anchor(Router::$routed_uri, html::specialchars($this->page_title));
$this->_build_calendar();
}
}