本文整理汇总了PHP中date::date_to_days方法的典型用法代码示例。如果您正苦于以下问题:PHP date::date_to_days方法的具体用法?PHP date::date_to_days怎么用?PHP date::date_to_days使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类date
的用法示例。
在下文中一共展示了date::date_to_days方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: date
function test_new_host_new_day()
{
$this->test_new_host();
$date = new date();
$date->set_by_days($date->date_to_days() + 1);
$this->stats_counter->set_new_host();
$this->stats_counter->update($date);
$this->_check_stats_counter_record($hits_all = 2, $hits_today = 1, $hosts_all = 2, $hosts_today = 1, $date);
$this->_check_stats_day_counters_record($hits_today, $hosts_today, $home_hits = 0, $audience_host = 0, $date);
$this->_check_counters_consistency($date);
}
示例2: date
function test_same_host_new_day()
{
$date = new date();
$ip = ip::encode_ip('192.168.0.5');
$this->stats_ip->setReturnValue('get_client_ip', $ip);
$this->stats_ip->is_new_host($date);
$date = new date();
$date->set_by_days($date->date_to_days() + 1);
$this->stats_ip->setReturnValueAt(1, 'get_client_ip', $ip);
$this->assertTrue($this->stats_ip->is_new_host($date));
$this->_check_stats_ip_record($total_records = 1, $ip, $date);
}