本文整理汇总了PHP中date::tomorrow方法的典型用法代码示例。如果您正苦于以下问题:PHP date::tomorrow方法的具体用法?PHP date::tomorrow怎么用?PHP date::tomorrow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类date
的用法示例。
在下文中一共展示了date::tomorrow方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getList
/**
* Get customer list.
*
* @param string $mode
* @param mix $param
* @param string $relation client|provider
* @param string $orderBy
* @param object $pager
* @access public
* @return array
*/
public function getList($mode = 'all', $param = null, $relation = 'client', $orderBy = 'id_desc', $pager = null)
{
$customerIdList = $this->getCustomersSawByMe();
if (empty($customerIdList)) {
return array();
}
$this->app->loadClass('date', $static = true);
$thisMonth = date::getThisMonth();
$thisWeek = date::getThisWeek();
if ($this->session->customerQuery == false) {
$this->session->set('customerQuery', ' 1 = 1');
}
$customerQuery = $this->loadModel('search', 'sys')->replaceDynamic($this->session->customerQuery);
if (strpos($orderBy, 'id') === false) {
$orderBy .= ', id_desc';
}
return $this->dao->select('*')->from(TABLE_CUSTOMER)->where('deleted')->eq(0)->beginIF($relation == 'client')->andWhere('relation')->ne('provider')->beginIF($relation == 'provider')->andWhere('relation')->ne('client')->beginIF($mode == 'field')->andWhere('mode')->eq($param)->fi()->beginIF($mode == 'past')->andWhere('nextDate')->lt(helper::today())->fi()->beginIF($mode == 'today')->andWhere('nextDate')->eq(helper::today())->fi()->beginIF($mode == 'tomorrow')->andWhere('nextDate')->eq(formattime(date::tomorrow(), DT_DATE1))->fi()->beginIF($mode == 'thisweek')->andWhere('nextDate')->between($thisWeek['begin'], $thisWeek['end'])->fi()->beginIF($mode == 'thismonth')->andWhere('nextDate')->between($thisMonth['begin'], $thisMonth['end'])->fi()->beginIF($mode == 'public')->andWhere('public')->eq('1')->fi()->beginIF($mode == 'assignedTo')->andWhere('assignedTo')->eq($this->app->user->account)->fi()->beginIF($mode == 'query')->andWhere($param)->fi()->beginIF($mode == 'bysearch')->andWhere($customerQuery)->fi()->beginIF(strpos('all, bysearch, public, assignedTo, query', $mode) === false)->andWhere('nextDate')->ne('0000-00-00')->fi()->andWhere('id')->in($customerIdList)->orderBy($orderBy)->page($pager)->fetchAll('id');
}
示例2: getList
/**
* Get order list.
*
* @param string $mode
* @param mix $param
* @param string $orderBy
* @param object $pager
* @access public
* @return array
*/
public function getList($mode = 'all', $param = null, $owner = '', $orderBy = 'id_desc', $pager = null)
{
$customerIdList = $this->loadModel('customer')->getCustomersSawByMe();
if (empty($customerIdList)) {
return array();
}
$products = $this->loadModel('product')->getPairs();
$this->app->loadClass('date', $static = true);
$thisMonth = date::getThisMonth();
$thisWeek = date::getThisWeek();
/* Process search condition. */
if ($this->session->orderQuery == false) {
$this->session->set('orderQuery', ' 1 = 1');
}
$orderQuery = $this->loadModel('search', 'sys')->replaceDynamic($this->session->orderQuery);
if (strpos($orderBy, 'status') !== false) {
$orderBy .= ', closedReason';
}
if (strpos($orderBy, 'id') === false) {
$orderBy .= ', id_desc';
}
$userList = $this->loadModel('user')->getSubUsers($this->app->user);
$orders = $this->dao->select('o.*, c.name as customerName, c.level as level')->from(TABLE_ORDER)->alias('o')->leftJoin(TABLE_CUSTOMER)->alias('c')->on("o.customer=c.id")->where('o.deleted')->eq(0)->beginIF($userList != '')->andWhere()->markLeft(1)->where('o.assignedTo')->in($userList)->orWhere('o.createdBy')->in($userList)->orWhere('o.editedBy')->in($userList)->orWhere('o.signedBy')->in($userList)->markRight(1)->fi()->beginIF($mode == 'past')->andWhere('o.nextDate')->andWhere('o.nextDate')->lt(helper::today())->fi()->beginIF($mode == 'today')->andWhere('o.nextDate')->eq(helper::today())->fi()->beginIF($mode == 'tomorrow')->andWhere('o.nextDate')->eq(formattime(date::tomorrow(), DT_DATE1))->fi()->beginIF($mode == 'thisweek')->andWhere('o.nextDate')->between($thisWeek['begin'], $thisWeek['end'])->fi()->beginIF($mode == 'thismonth')->andWhere('o.nextDate')->between($thisMonth['begin'], $thisMonth['end'])->fi()->beginIF($mode == 'public')->andWhere('public')->eq('1')->fi()->beginIF($mode == 'assignedTo')->andWhere('o.assignedTo')->eq($this->app->user->account)->fi()->beginIF($mode == 'createdBy')->andWhere('o.createdBy')->eq($this->app->user->account)->fi()->beginIF($mode == 'signedBy')->andWhere('o.signedBy')->eq($this->app->user->account)->fi()->beginIF($mode == 'query')->andWhere($param)->fi()->beginIF($mode == 'bysearch')->andWhere($orderQuery)->fi()->andWhere('o.customer')->in($customerIdList)->orderBy($orderBy)->page($pager)->fetchAll('id');
foreach ($orders as $order) {
$order->products = array();
$productList = explode(',', $order->product);
foreach ($productList as $product) {
if (isset($products[$product])) {
$order->products[] = $products[$product];
}
}
}
foreach ($orders as $order) {
$productName = count($order->products) > 1 ? current($order->products) . $this->lang->etc : current($order->products);
$order->title = sprintf($this->lang->order->titleLBL, $order->customerName, $productName, date('Y-m-d', strtotime($order->createdDate)));
}
return $orders;
}
示例3: computeBeginAndEnd
/**
* Compute the begin date and end date of a period.
*
* @param string $period all|today|yesterday|twodaysago|latest2days|thisweek|lastweek|thismonth|lastmonth
* @access public
* @return array
*/
public function computeBeginAndEnd($period)
{
$this->app->loadClass('date');
$today = date::today();
$tomorrow = date::tomorrow();
$yesterday = date::yesterday();
$twoDaysAgo = date::twoDaysAgo();
$period = strtolower($period);
if ($period == 'all') {
return array('begin' => '1970-1-1', 'end' => '2109-1-1');
}
if ($period == 'today') {
return array('begin' => $today, 'end' => $tomorrow);
}
if ($period == 'yesterday') {
return array('begin' => $yesterday, 'end' => $today);
}
if ($period == 'twodaysago') {
return array('begin' => $twoDaysAgo, 'end' => $yesterday);
}
if ($period == 'latest3days') {
return array('begin' => $twoDaysAgo, 'end' => $tomorrow);
}
/* If the period is by week, add the end time to the end date. */
if ($period == 'thisweek' or $period == 'lastweek') {
$func = "get{$period}";
extract(date::$func());
return array('begin' => $begin, 'end' => $end . ' 23:59:59');
}
if ($period == 'thismonth') {
return date::getThisMonth();
}
if ($period == 'lastmonth') {
return date::getLastMonth();
}
}