本文整理匯總了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);
}