当前位置: 首页>>代码示例>>PHP>>正文


PHP CakeTime::isToday方法代码示例

本文整理汇总了PHP中CakeTime::isToday方法的典型用法代码示例。如果您正苦于以下问题:PHP CakeTime::isToday方法的具体用法?PHP CakeTime::isToday怎么用?PHP CakeTime::isToday使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CakeTime的用法示例。


在下文中一共展示了CakeTime::isToday方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: follow_expedient

 /**
  * index method
  *
  * @return void
  */
 public function follow_expedient($idE = null)
 {
     App::uses('CakeTime', 'Utility');
     $confirmas = $this->Confirma->Expediente->find('all', array('conditions' => array('Expediente.user_id' => $idE)));
     if (isset($confirmas[0]['Expediente']['previsao_chegada']) && !empty($confirmas[0]['Expediente']['previsao_chegada'])) {
         if (CakeTime::isToday($confirmas[0]['Expediente']['previsao_chegada'])) {
             /* greet user with a happy birthday message
                  Enviar um email alertando sobre a data quase vencida.
                */
             $vence_hoje = 'Chega Hoje';
             if (isset($vence_hoje) && empty($vence_hoje)) {
                 $vence_hoje = '';
             }
             $this->set('vence_hoje', $vence_hoje);
         }
     }
     $this->set(compact('confirmas', 'idE'));
 }
开发者ID:Goncalves007,项目名称:Projecto-EI,代码行数:23,代码来源:ConfirmasController.php

示例2: days

 /**
  *    Days in theme
  *    @param int $theme_id
  */
 public function days($theme_id = null, $user_id = null)
 {
     if (!$theme_id) {
         return;
     }
     $options = array('recursive' => -1, 'conditions' => array('Day.theme_id' => $theme_id), 'order' => array('data ASC'));
     $rows = $this->Day->find('all', $options);
     foreach ($rows as $key => $row) {
         $row['Day']['isFuture'] = false;
         $row['Day']['isPast'] = false;
         $row['Day']['isToday'] = false;
         $row['Day']['comments'] = $this->Comment->find('count', array('conditions' => array('Comment.user_id' => !$this->isUser() ? $user_id : $this->getUserId(), 'Comment.day_id' => $row['Day']['id'])));
         if (CakeTime::isFuture($row['Day']['data'])) {
             $row['Day']['isFuture'] = true;
         }
         if (CakeTime::isPast($row['Day']['data'])) {
             $row['Day']['isPast'] = true;
         }
         if (CakeTime::isToday($row['Day']['data'])) {
             $row['Day']['isToday'] = true;
         }
         $data[] = $row['Day'];
     }
     $this->set($data);
     $this->set('_serialize', array_keys($data));
 }
开发者ID:ranostaj,项目名称:iqualJs,代码行数:30,代码来源:ThemesController.php

示例3: isToday

 /**
  * Returns true if given datetime string is today.
  *
  * @param int|string|DateTime $dateString UNIX timestamp, strtotime() valid string or DateTime object
  * @param string|DateTimeZone $timezone   User's timezone string or DateTimeZone object
  *
  * @return bool True if datetime string is today
  * @see  CakeTime::isToday()
  * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#testing-time
  */
 public function isToday($dateString, $timezone = NULL)
 {
     return $this->_engine->isToday($dateString, $timezone);
 }
开发者ID:mrbadao,项目名称:api-official,代码行数:14,代码来源:TimeHelper.php


注:本文中的CakeTime::isToday方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。