本文整理汇总了PHP中w2p_Utilities_Date::setYear方法的典型用法代码示例。如果您正苦于以下问题:PHP w2p_Utilities_Date::setYear方法的具体用法?PHP w2p_Utilities_Date::setYear怎么用?PHP w2p_Utilities_Date::setYear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类w2p_Utilities_Date
的用法示例。
在下文中一共展示了w2p_Utilities_Date::setYear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
$last_time = new w2p_Utilities_Date($date);
$last_time->setDay($date->getDaysInMonth());
$last_time->setTime(23, 59, 59);
// if Saturday is the last day of month, we don't need to go forward
// as that's the last day shown on the calendar
if ($last_time->getDayOfWeek() != 6) {
$first_day_of_next_month = $last_time->getNextDay();
$day_of_next_month = $first_day_of_next_month->getDayOfWeek();
$seconds_to_add_in_next_month = 86400 * $day_of_next_month;
// need to cast it to int because Pear::Date_Span::set down the line
// fails to set the seconds correctly
$first_day_of_next_month->addSeconds((int) $seconds_to_add_in_next_month);
$last_time->setDay($first_day_of_next_month->getDay());
$last_time->setMonth($first_day_of_next_month->getMonth());
$last_time->setYear($first_day_of_next_month->getYear());
}
$links = array();
// assemble the links for the tasks
require_once W2P_BASE_DIR . '/modules/calendar/links_tasks.php';
getTaskLinks($first_time, $last_time, $links, 20, $company_id);
// assemble the links for the events
require_once W2P_BASE_DIR . '/modules/calendar/links_events.php';
getEventLinks($first_time, $last_time, $links, 20);
$moduleList = $AppUI->getLoadableModuleList();
foreach ($moduleList as $module) {
if (!in_array($module['mod_main_class'], get_declared_classes())) {
require_once $AppUI->getModuleClass($module['mod_directory']);
}
$object = new $module['mod_main_class']();
if (is_callable(array($object, 'hook_calendar')) && is_callable(array($object, 'getCalendarLink'))) {