本文整理匯總了PHP中TTDate::getTimeStamp方法的典型用法代碼示例。如果您正苦於以下問題:PHP TTDate::getTimeStamp方法的具體用法?PHP TTDate::getTimeStamp怎麽用?PHP TTDate::getTimeStamp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TTDate
的用法示例。
在下文中一共展示了TTDate::getTimeStamp方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getPayrollDeductionObject
function getPayrollDeductionObject()
{
if (!isset($this->payroll_deduction_obj)) {
require_once Environment::getBasePath() . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'payroll_deduction' . DIRECTORY_SEPARATOR . 'PayrollDeduction.class.php';
$this->payroll_deduction_obj = new PayrollDeduction('CA', NULL);
$this->payroll_deduction_obj->setDate(TTDate::getTimeStamp($this->year, 12, 31));
}
return $this->payroll_deduction_obj;
}
示例2: unset
}
}
unset($tmp_schedule_shifts, $tmp2_schedule_shifts);
$tmp_schedule_shifts = $schedule_shifts;
}
//print_r($schedule_shifts);
if (isset($tmp_schedule_shifts)) {
//Format array so Smarty has an easier time.
foreach ($tmp_schedule_shifts as $day_epoch => $day_tmp_schedule_shift) {
foreach ($day_tmp_schedule_shift as $branch => $department_schedule_shifts) {
foreach ($department_schedule_shifts as $department => $user_schedule_shifts) {
foreach ($user_schedule_shifts as $user_id => $user_schedule_shifts) {
$x = 0;
foreach ($user_schedule_shifts as $user_schedule_shift) {
if ($x == 0) {
$tmp_min_start_date = TTDate::getTimeStamp(date('Y', $user_schedule_shift['start_time']), date('m', $user_schedule_shift['start_time']), date('d', $user_schedule_shift['start_time']), $min_hour);
} else {
$tmp_min_start_date = $prev_user_schedule_shift['end_time'];
}
$off_duty = ($user_schedule_shift['start_time'] - $tmp_min_start_date) / 900;
//15 Min increments
$on_duty = ($user_schedule_shift['end_time'] - $user_schedule_shift['start_time']) / 900;
$user_schedule_shift['off_duty'] = $off_duty;
$user_schedule_shift['on_duty'] = $on_duty;
$schedule_shifts[$day_epoch][$branch][$department][$user_id][] = $user_schedule_shift;
$prev_user_schedule_shift = $user_schedule_shift;
$x++;
}
}
}
}