本文整理汇总了PHP中CitruscartHelperBase::getCorrectBeginDayTime方法的典型用法代码示例。如果您正苦于以下问题:PHP CitruscartHelperBase::getCorrectBeginDayTime方法的具体用法?PHP CitruscartHelperBase::getCorrectBeginDayTime怎么用?PHP CitruscartHelperBase::getCorrectBeginDayTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CitruscartHelperBase
的用法示例。
在下文中一共展示了CitruscartHelperBase::getCorrectBeginDayTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _lastYear
/**
*
* @return unknown_type
*/
function _lastYear()
{
$database = JFactory::getDBO();
$date = JFactory::getDate();
//get local data
$today = CitruscartHelperBase::getCorrectBeginDayTime($date);
//first day of year
$first_day_year = $date->format("%Y-01-01 00:00:00");
$enddate = CitruscartHelperBase::getCorrectBeginDayTime($first_day_year);
$query = new CitruscartQuery();
$query = " SELECT DATE_SUB('" . $enddate . "', INTERVAL 1 YEAR) ";
$database->setQuery($query);
$startdate = $database->loadResult();
$return = $this->_getDateDb($startdate, $enddate, true, true);
$days = $return->days_in_business > 0 ? $return->days_in_business : 1;
$return->average_daily = $return->num / $days;
return $return;
}