當前位置: 首頁>>代碼示例>>PHP>>正文


PHP TimeDate::get_user_time_format方法代碼示例

本文整理匯總了PHP中TimeDate::get_user_time_format方法的典型用法代碼示例。如果您正苦於以下問題:PHP TimeDate::get_user_time_format方法的具體用法?PHP TimeDate::get_user_time_format怎麽用?PHP TimeDate::get_user_time_format使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TimeDate的用法示例。


在下文中一共展示了TimeDate::get_user_time_format方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: call

<?php

require_once 'modules/Calls_Reschedule/Calls_Reschedule.php';
require_once 'modules/Calls/Call.php';
$call = new call();
$timedate = new TimeDate();
$id = $_POST['call_id'];
$date = $_POST['date'];
$reason = $_POST['reason'];
$hour = $_POST['date_start_hours'];
$minutes = $_POST['date_start_minutes'];
$ampm = $_POST['date_start_meridiem'];
$time_format = $timedate->get_user_time_format();
//get the logged in users time settings
//Combine date and time dependant on users settings
$time_separator = ":";
if (preg_match('/\\d+([^\\d])\\d+([^\\d]*)/s', $time_format, $match)) {
    $time_separator = $match[1];
}
if (!empty($hour) && !empty($minutes)) {
    $time_start = $hour . $time_separator . $minutes;
}
if (isset($ampm) && !empty($ampm)) {
    $time_start = $timedate->merge_time_meridiem($time_start, $timedate->get_time_format(), $ampm);
}
if (isset($time_start) && strlen($date) == 10) {
    $date_start = $date . ' ' . $time_start;
}
$call->retrieve($id);
$call->date_start = $date_start;
//set new the start date
開發者ID:MexinaD,項目名稱:SuiteCRM,代碼行數:31,代碼來源:Reschedule.php

示例2: foreach

         $xtpl->assign("CELL_WIDTH", $col_width);
         $xtpl->parse("main." . $section_name . ".merge_cell_edit_checkbox");
         break;
     case 'date':
     case 'datetime':
         $xtpl->assign("CALENDAR_LANG", "en");
         $xtpl->assign("USER_DATEFORMAT", '(' . $timedate->get_user_date_format() . ')');
         $xtpl->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
         $xtpl->assign("EDIT_FIELD_VALUE", $select_row_curr_field_value);
         $xtpl->assign("CELL_WIDTH", $col_width);
         $xtpl->assign("THEME", $theme);
         $xtpl->parse("main." . $section_name . ".merge_cell_edit_date");
         break;
     case 'datetimecombo':
         $xtpl->assign("CALENDAR_LANG", "en");
         $xtpl->assign("USER_DATEFORMAT", $timedate->get_user_time_format());
         $xtpl->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
         $xtpl->assign("EDIT_FIELD_VALUE", $select_row_curr_field_value);
         $xtpl->assign("CELL_WIDTH", $col_width);
         $xtpl->assign("THEME", $theme);
         $xtpl->parse("main." . $section_name . ".merge_cell_edit_datetime");
         break;
     default:
         break;
 }
 //render a column for each selected record to merge
 foreach ($merge_ids_array as $id) {
     $xtpl->assign("CELL_WIDTH", $col_width);
     $field_name = null;
     switch ($field_check) {
         case 'bool':
開發者ID:aldridged,項目名稱:gtg-sugar,代碼行數:31,代碼來源:Step3.php


注:本文中的TimeDate::get_user_time_format方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。