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


PHP calendar::calculateDate方法代码示例

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


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

示例1: toCalculateTime

 public function toCalculateTime($aData, $iDate = null)
 {
     G::LoadClass('calendar');
     $oCalendar = new calendar();
     $iDate = isset($iDate) ? $iDate : date('Y-m-d H:i:s');
     $estimatedDuration = $aData['EVN_TAS_ESTIMATED_DURATION'];
     //task duration
     $when = $aData['EVN_WHEN'];
     //how many days
     $whenOccurs = $aData['EVN_WHEN_OCCURS'];
     //time on action (AFTER_TIME/TASK_STARTED)
     if ($oCalendar->pmCalendarUid == '') {
         $oCalendar->getCalendar(null, $aData['PRO_UID'], $aData['TAS_UID']);
         $oCalendar->getCalendarData();
     }
     if ($whenOccurs == 'TASK_STARTED') {
         $calculatedDueDateA = $oCalendar->calculateDate($iDate, $when, 'days');
         $sActionDate = date('Y-m-d H:i:s', $calculatedDueDateA['DUE_DATE_SECONDS']);
     } else {
         $calculatedDueDateA = $oCalendar->calculateDate($iDate, $estimatedDuration + $when, 'days');
         $sActionDate = date('Y-m-d H:i:s', $calculatedDueDateA['DUE_DATE_SECONDS']);
     }
     return $sActionDate;
 }
开发者ID:bqevin,项目名称:processmaker,代码行数:24,代码来源:Event.php

示例2: calculateDueDate

 public function calculateDueDate($sNextTasParam)
 {
     //Get Task properties
     $task = TaskPeer::retrieveByPK($this->getTasUid());
     $aData['TAS_UID'] = $this->getTasUid();
     //Added to allow User defined Timing Control at Run time from Derivation screen
     if (isset($sNextTasParam['NEXT_TASK']['TAS_TRANSFER_HIDDEN_FLY']) && $sNextTasParam['NEXT_TASK']['TAS_TRANSFER_HIDDEN_FLY'] == 'true') {
         $aData['TAS_DURATION'] = $sNextTasParam['NEXT_TASK']['TAS_DURATION'];
         $aData['TAS_TIMEUNIT'] = $sNextTasParam['NEXT_TASK']['TAS_TIMEUNIT'];
         $aData['TAS_TYPE_DAY'] = $sNextTasParam['NEXT_TASK']['TAS_TYPE_DAY'];
         if (isset($sNextTasParam['NEXT_TASK']['TAS_CALENDAR']) && $sNextTasParam['NEXT_TASK']['TAS_CALENDAR'] != '') {
             $aCalendarUID = $sNextTasParam['NEXT_TASK']['TAS_CALENDAR'];
         } else {
             $aCalendarUID = '';
         }
         //Updating the task Table , so that user will see updated values in the assign screen in consequent cases
         $oTask = new Task();
         $oTask->update($aData);
     } else {
         if (is_null($task)) {
             return 0;
         }
         $aData['TAS_DURATION'] = $task->getTasDuration();
         $aData['TAS_TIMEUNIT'] = $task->getTasTimeUnit();
         $aData['TAS_TYPE_DAY'] = $task->getTasTypeDay();
         $aCalendarUID = '';
     }
     //use the dates class to calculate dates
     $calendar = new calendar();
     if ($calendar->pmCalendarUid == '') {
         $calendar->getCalendar(null, $task->getProUid(), $aData['TAS_UID']);
         $calendar->getCalendarData();
     }
     $iDueDate = $calendar->calculateDate($this->getDelDelegateDate(), $aData['TAS_DURATION'], $aData['TAS_TIMEUNIT']);
     return $iDueDate;
 }
开发者ID:norahmollo,项目名称:processmaker,代码行数:36,代码来源:AppDelegation.php

示例3: executeCaseSelfService


//.........这里部分代码省略.........

            $appcacheAppUid   = $row["APP_UID"];

            $appcacheDelIndex = $row["DEL_INDEX"];

            $appcacheDelDelegateDate = $row["DEL_DELEGATE_DATE"];

            $appcacheAppNumber = $row["APP_NUMBER"];

            $appcacheProUid    = $row["PRO_UID"];

            $taskUid = $row["TAS_UID"];

            $taskSelfServiceTime = intval($row["TAS_SELFSERVICE_TIME"]);

            $taskSelfServiceTimeUnit = $row["TAS_SELFSERVICE_TIME_UNIT"];

            $taskSelfServiceTriggerUid = $row["TAS_SELFSERVICE_TRIGGER_UID"];

            /*----------------------------------********---------------------------------*/



            if ($calendar->pmCalendarUid == '') {

            	$calendar->getCalendar(null, $appcacheProUid, $taskUid);

            	$calendar->getCalendarData();

            }



            $dueDate = $calendar->calculateDate(

                $appcacheDelDelegateDate,

                $taskSelfServiceTime,

                $taskSelfServiceTimeUnit //HOURS|DAYS|MINUTES

                //1

            );



            if (time() > $dueDate["DUE_DATE_SECONDS"] && $flag == false) {

                $sessProcess = null;

                $sessProcessSw = 0;



                //Load data

                $case = new Cases();

                $appFields = $case->loadCase($appcacheAppUid);



                $appFields["APP_DATA"]["APPLICATION"] = $appcacheAppUid;

开发者ID:nhenderson,项目名称:processmaker,代码行数:65,代码来源:cron_single.php


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