本文整理匯總了PHP中DateTimeUtil::getDayStart方法的典型用法代碼示例。如果您正苦於以下問題:PHP DateTimeUtil::getDayStart方法的具體用法?PHP DateTimeUtil::getDayStart怎麽用?PHP DateTimeUtil::getDayStart使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DateTimeUtil
的用法示例。
在下文中一共展示了DateTimeUtil::getDayStart方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: DateTimeUtil
include_once "DateTimeUtil.php";
include_once "MysqlConnector.php";
include_once "StatisticsMysqlReadController.php";
$clientQuery = $_GET["query"];
$from = $_GET["from"];
$to = $_GET["to"];
$outputCollection = "";
$isQueryForClicks = false;
$dateTimeUtil = new DateTimeUtil($timeNow);
$mysqlConnector = new MysqlConnector($mysqlHost, $mysqlUser, $mysqlPw, $mysqlDbName);
$statisticsMysqlReadController = new StatisticsMysqlReadController($mysqlDbName, $mysqlConnector->link, $dateTimeUtil);
$statisticStart = $statisticsMysqlReadController->queryConfig("StatisticStart", "DateTimeValue");
if (empty($clientQuery)) {
$outputCollection = array();
$outputCollection["statisticStart"] = $statisticStart;
$outputCollection["serverDayStart"] = $dateTimeUtil->getDayStart();
$JsonPrettyPrint = 128;
echo json_encode($outputCollection, $JsonPrettyPrint);
exit;
}
if (strtotime($from) < strtotime($statisticStart)) {
$from = $statisticStart;
}
if (strtotime($to) > strtotime($dateTimeUtil->getDayStart())) {
$to = $dateTimeUtil->getDayStart();
}
$queryColumns = null;
if (!empty($_GET["query"])) {
$queryColumns = explode(",", $_GET["query"]);
for ($i = 0; $i < count($queryColumns); $i++) {
if (empty($queryColumns[$i])) {