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


PHP TTDate::getDayOfMonthArray方法代码示例

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


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

示例1: getOptions

 static function getOptions($name, $interval = 1)
 {
     $all_array_option = array('*' => TTi18n::getText('-- All --'));
     $retval = FALSE;
     switch ($name) {
         case 'minute':
             for ($i = 0; $i <= 59; $i += $interval) {
                 $retval[$i] = $i;
             }
             $retval = Misc::prependArray($all_array_option, $retval);
             break;
         case 'hour':
             for ($i = 0; $i <= 23; $i += $interval) {
                 $retval[$i] = $i;
             }
             $retval = Misc::prependArray($all_array_option, $retval);
             break;
         case 'day_of_month':
             $retval = Misc::prependArray($all_array_option, TTDate::getDayOfMonthArray());
             break;
         case 'month':
             $retval = Misc::prependArray($all_array_option, TTDate::getMonthOfYearArray());
             break;
         case 'day_of_week':
             $retval = Misc::prependArray($all_array_option, TTDate::getDayOfWeekArray());
             break;
     }
     return $retval;
 }
开发者ID:alachaum,项目名称:timetrex,代码行数:29,代码来源:Cron.class.php

示例2: array

                //Debug::Arr($station,'Department', __FILE__, __LINE__, __METHOD__,10);
                $pay_period_schedule_data = array('id' => $pay_period_schedule->getId(), 'company_id' => $pay_period_schedule->getCompany(), 'name' => $pay_period_schedule->getName(), 'description' => $pay_period_schedule->getDescription(), 'type' => $pay_period_schedule->getType(), 'start_week_day_id' => $pay_period_schedule->getStartWeekDay(), 'start_day_of_week' => $pay_period_schedule->getStartDayOfWeek(), 'transaction_date' => $pay_period_schedule->getTransactionDate(), 'primary_day_of_month' => $pay_period_schedule->getPrimaryDayOfMonth(), 'secondary_day_of_month' => $pay_period_schedule->getSecondaryDayOfMonth(), 'primary_transaction_day_of_month' => $pay_period_schedule->getPrimaryTransactionDayOfMonth(), 'secondary_transaction_day_of_month' => $pay_period_schedule->getSecondaryTransactionDayOfMonth(), 'transaction_date_bd' => $pay_period_schedule->getTransactionDateBusinessDay(), 'anchor_date' => $pay_period_schedule->getAnchorDate(), 'annual_pay_periods' => $pay_period_schedule->getAnnualPayPeriods(), 'day_start_time' => $pay_period_schedule->getDayStartTime(), 'time_zone' => $pay_period_schedule->getTimeZone(), 'new_day_trigger_time' => $pay_period_schedule->getNewDayTriggerTime(), 'maximum_shift_time' => $pay_period_schedule->getMaximumShiftTime(), 'shift_assigned_day_id' => $pay_period_schedule->getShiftAssignedDay(), 'timesheet_verify_type_id' => $pay_period_schedule->getTimeSheetVerifyType(), 'timesheet_verify_before_end_date' => $pay_period_schedule->getTimeSheetVerifyBeforeEndDate(), 'timesheet_verify_before_transaction_date' => $pay_period_schedule->getTimeSheetVerifyBeforeTransactionDate(), 'timesheet_verify_notice_before_transaction_date' => $pay_period_schedule->getTimeSheetVerifyNoticeBeforeTransactionDate(), 'timesheet_verify_notice_email' => $pay_period_schedule->getTimeSheetVerifyNoticeEmail(), 'user_ids' => $pay_period_schedule->getUser(), 'deleted' => $pay_period_schedule->getDeleted(), 'created_date' => $pay_period_schedule->getCreatedDate(), 'created_by' => $pay_period_schedule->getCreatedBy(), 'updated_date' => $pay_period_schedule->getUpdatedDate(), 'updated_by' => $pay_period_schedule->getUpdatedBy(), 'deleted_date' => $pay_period_schedule->getDeletedDate(), 'deleted_by' => $pay_period_schedule->getDeletedBy());
            }
        } elseif ($action != 'submit') {
            $pay_period_schedule_data = array('anchor_date' => TTDate::getBeginMonthEpoch(time()), 'day_start_time' => 0, 'new_day_trigger_time' => 3600 * 4, 'maximum_shift_time' => 3600 * 16, 'time_zone' => $current_user_prefs->getTimeZone(), 'type' => 20, 'timesheet_verify_type_id' => 10, 'timesheet_verify_before_end_date' => 0, 'timesheet_verify_before_transaction_date' => 0, 'annual_pay_periods' => 0);
        }
        //Select box options;
        $pay_period_schedule_data['type_options'] = $ppsf->getOptions('type');
        $pay_period_schedule_data['start_week_day_options'] = $ppsf->getOptions('start_week_day');
        $pay_period_schedule_data['shift_assigned_day_options'] = $ppsf->getOptions('shift_assigned_day');
        $pay_period_schedule_data['timesheet_verify_type_options'] = $ppsf->getOptions('timesheet_verify_type');
        $pay_period_schedule_data['time_zone_options'] = $ppsf->getTimeZoneOptions();
        $pay_period_schedule_data['transaction_date_bd_options'] = $ppsf->getOptions('transaction_date_business_day');
        $pay_period_schedule_data['day_of_week_options'] = TTDate::getDayOfWeekArray();
        $pay_period_schedule_data['transaction_date_options'] = Misc::prependArray(array(0 => '0'), TTDate::getDayOfMonthArray());
        $pay_period_schedule_data['day_of_month_options'] = TTDate::getDayOfMonthArray();
        $pay_period_schedule_data['day_of_month_options'][-1] = TTi18n::gettext('- Last Day Of Month -');
        $pay_period_schedule_data['user_options'] = UserListFactory::getByCompanyIdArray($current_company->getId(), FALSE, TRUE);
        if (isset($pay_period_schedule_data['user_ids']) and is_array($pay_period_schedule_data['user_ids'])) {
            $tmp_user_options = UserListFactory::getByCompanyIdArray($current_company->getId(), FALSE, TRUE);
            foreach ($pay_period_schedule_data['user_ids'] as $user_id) {
                if (isset($tmp_user_options[$user_id])) {
                    $filter_user_options[$user_id] = $tmp_user_options[$user_id];
                }
            }
            unset($user_id);
        }
        $smarty->assign_by_ref('filter_user_options', $filter_user_options);
        $smarty->assign_by_ref('pay_period_schedule_data', $pay_period_schedule_data);
        break;
}
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:EditPayPeriodSchedule.php

示例3: setSecondaryTransactionDayOfMonth

 function setSecondaryTransactionDayOfMonth($val)
 {
     $val = trim($val);
     $key = Option::getByValue($val, TTDate::getDayOfMonthArray());
     if ($key !== FALSE) {
         $val = $key;
     }
     if ($val == -1 or $this->Validator->inArrayKey('secondary_transaction_day_of_month', $val, TTi18n::gettext('Incorrect secondary transaction day of month'), TTDate::getDayOfMonthArray())) {
         $this->data['secondary_transaction_day_of_month'] = $val;
         return TRUE;
     }
     return FALSE;
 }
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:13,代码来源:PayPeriodScheduleFactory.class.php

示例4: array

            Debug::Text('Lowest ID: ' . $row_keys[0], __FILE__, __LINE__, __METHOD__, 10);
            $lowest_id = $row_keys[0];
            if ($lowest_id < 0) {
                $next_blank_id = $lowest_id - 1;
            } else {
                $next_blank_id = -1;
            }
            Debug::Text('Next Blank ID: ' . $next_blank_id, __FILE__, __LINE__, __METHOD__, 10);
            $data['milestone_rows'][$next_blank_id] = array('id' => $next_blank_id, 'length_of_service' => 0, 'accrual_rate' => 0, 'minimum_time' => 0, 'maximum_time' => 0);
        } elseif ($action != 'submit' and $action != 'change_type') {
            $data = array('type_id' => 10, 'minimum_employed_days' => 0, 'recalculate_start_date' => TTDate::getBeginMonthEpoch(time()), 'recalculate_end_date' => TTDate::getEndMonthEpoch(time()), 'milestone_rows' => array(-1 => array('id' => -1, 'length_of_service' => 0, 'accrual_rate' => '0.0000', 'minimum_time' => 0, 'maximum_time' => 0)));
        } else {
            if ($data['type_id'] == 20) {
                $data['recalculate_start_date'] = TTDate::getBeginMonthEpoch(time());
                $data['recalculate_end_date'] = TTDate::getEndMonthEpoch(time());
            }
        }
        //print_r($data);
        //Select box options;
        $data['type_options'] = $apf->getOptions('type');
        $data['apply_frequency_options'] = $apf->getOptions('apply_frequency');
        $data['month_options'] = TTDate::getMonthOfYearArray();
        $data['day_of_month_options'] = TTDate::getDayOfMonthArray();
        $data['day_of_week_options'] = TTDate::getDayOfWeekArray();
        $data['length_of_service_unit_options'] = $apmf->getOptions('length_of_service_unit');
        $smarty->assign_by_ref('data', $data);
        break;
}
$smarty->assign_by_ref('apf', $apf);
$smarty->assign_by_ref('apmf', $apmf);
$smarty->display('policy/EditAccrualPolicy.tpl');
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:EditAccrualPolicy.php

示例5: setApplyFrequencyDayOfMonth

 function setApplyFrequencyDayOfMonth($value)
 {
     $value = trim($value);
     if ($value == 0 or $this->Validator->inArrayKey('apply_frequency_day_of_month', $value, TTi18n::gettext('Incorrect frequency day of month'), TTDate::getDayOfMonthArray())) {
         $this->data['apply_frequency_day_of_month'] = $value;
         return TRUE;
     }
     return FALSE;
 }
开发者ID:alachaum,项目名称:timetrex,代码行数:9,代码来源:CompanyDeductionFactory.class.php

示例6: setMilestoneRolloverDayOfMonth

 function setMilestoneRolloverDayOfMonth($value)
 {
     $value = trim($value);
     if ($value == 0 or $this->Validator->inArrayKey('milestone_rollover_day_of_month', $value, TTi18n::gettext('Incorrect milestone rollover day of month'), TTDate::getDayOfMonthArray())) {
         $this->data['milestone_rollover_day_of_month'] = $value;
         return TRUE;
     }
     return FALSE;
 }
开发者ID:alachaum,项目名称:timetrex,代码行数:9,代码来源:AccrualPolicyFactory.class.php


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