本文整理汇总了PHP中Piwik\Date::secondsToDays方法的典型用法代码示例。如果您正苦于以下问题:PHP Date::secondsToDays方法的具体用法?PHP Date::secondsToDays怎么用?PHP Date::secondsToDays使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\Date
的用法示例。
在下文中一共展示了Date::secondsToDays方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getVisitorProfileVisitSummary
/**
* Returns a summary for an important visit. Used to describe the first & last visits of a visitor.
*
* @param Row $visit
* @return array
*/
private function getVisitorProfileVisitSummary($visit)
{
$today = Date::today();
$serverDate = $visit->getColumn('firstActionTimestamp');
return array('date' => $serverDate, 'prettyDate' => Date::factory($serverDate)->getLocalized(self::VISITOR_PROFILE_DATE_FORMAT), 'daysAgo' => (int) Date::secondsToDays($today->getTimestamp() - Date::factory($serverDate)->getTimestamp()), 'referrerType' => $visit->getColumn('referrerType'), 'referralSummary' => self::getReferrerSummaryForVisit($visit));
}
示例2: getVisitorProfileVisitSummary
/**
* Returns a summary for an important visit. Used to describe the first & last visits of a visitor.
*
* @param DataTable\Row $visit
* @return array
*/
private function getVisitorProfileVisitSummary($visit)
{
$today = Date::today();
$serverDate = $visit->getColumn('firstActionTimestamp');
return array('date' => $serverDate, 'prettyDate' => Date::factory($serverDate)->getLocalized(Piwik::translate('CoreHome_DateFormat')), 'daysAgo' => (int) Date::secondsToDays($today->getTimestamp() - Date::factory($serverDate)->getTimestamp()), 'referrerType' => $visit->getColumn('referrerType'), 'referralSummary' => self::getReferrerSummaryForVisit($visit));
}