本文整理汇总了PHP中date::set_second方法的典型用法代码示例。如果您正苦于以下问题:PHP date::set_second方法的具体用法?PHP date::set_second怎么用?PHP date::set_second使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类date
的用法示例。
在下文中一共展示了date::set_second方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: instance
function _set_period_filter()
{
$locale =& locale :: instance();
$start_date = new date();
$start_date->set_hour(0);
$start_date->set_minute(0);
$start_date->set_second(0);
if (isset($_REQUEST['stats_start_date']))
{
$start_date->set_by_string($_REQUEST['stats_start_date'], $locale->get_short_date_time_format());
}
$finish_date = new date();
if (isset($_REQUEST['stats_finish_date']))
{
$finish_date->set_by_string($_REQUEST['stats_finish_date'], $locale->get_short_date_time_format());
}
$finish_date->set_hour(23);
$finish_date->set_minute(59);
$finish_date->set_second(59);
$this->stats_report->set_period_filter($start_date, $finish_date);
}
示例2: date
function _set_period_filter(&$request)
{
$locale =& locale::instance();
$start_date = new date();
$start_date->set_hour(0);
$start_date->set_minute(0);
$start_date->set_second(0);
if ($stats_start_date = $request->get_attribute('stats_start_date')) {
$start_date->set_by_string($stats_start_date, $locale->get_short_date_time_format());
}
$finish_date = new date();
if ($stats_finish_date = $request->get_attribute('stats_finish_date')) {
$finish_date->set_by_string($stats_finish_date, $locale->get_short_date_time_format());
}
$finish_date->set_hour(23);
$finish_date->set_minute(59);
$finish_date->set_second(59);
$this->stats_report->set_period_filter($start_date, $finish_date);
}
示例3: date
function _create_finish_date($time_string = '')
{
$finish_date = new date();
if ($time_string) {
$finish_date->set_by_string($time_string, $this->locale->get_short_date_time_format());
}
$finish_date->set_hour(23);
$finish_date->set_minute(59);
$finish_date->set_second(59);
return $finish_date;
}