本文整理汇总了PHP中TimeDate::get_user_date_format方法的典型用法代码示例。如果您正苦于以下问题:PHP TimeDate::get_user_date_format方法的具体用法?PHP TimeDate::get_user_date_format怎么用?PHP TimeDate::get_user_date_format使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TimeDate
的用法示例。
在下文中一共展示了TimeDate::get_user_date_format方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetUserSettings
/**
* test fetching user settings
*/
public function testGetUserSettings()
{
$this->_setPrefs('d/m/Y', 'h:i:sA', "America/Lima");
$this->assertEquals('dd/mm/yyyy', $this->time_date->get_user_date_format());
//FIXME: $this->assertEquals('11:00:00PM', $this->time_date->get_user_time_format());
$tz = $this->time_date->getUserTimeZone();
$this->assertEquals(-300, $tz["gmtOffset"]);
// $this->assertEquals(60, $tz["dstOffset"]);
}
示例2: PurchaseOrderLine
$xtpl->assign("PAYMENT_TERM", get_select_options_with_id($app_list_strings['payment_terms'], $focus->payment_term));
$productrows = $focus->getProductRows();
if (count($productrows) == 0) {
$xtpl->assign("PRODUCTROWS", $focus->getProductRow(new PurchaseOrderLine(), 0, true));
$xtpl->parse("main.row1");
}
for ($i = 0; $i < count($productrows); $i++) {
$fieldcount = count($productrows[$i]);
$xtpl->assign("PRODUCTROWS", $focus->getProductRow($productrows[$i], $i, true));
$xtpl->parse("main.row1");
}
$xtpl->assign('PRODUCTCOUNT', count($productrows));
$xtpl->assign('PurchaseOrder', $xtpl_data);
$timedate = new TimeDate();
$xtpl->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
$xtpl->assign("USER_DATE_FORMAT", $timedate->get_user_date_format());
if (empty($focus->id)) {
$focus->assigned_user_id = $current_user->id;
}
if (empty($focus->id)) {
$focus->assigned_user_name = $current_user->user_name;
}
$xtpl->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name);
$xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id);
$xtpl->assign("ASSIGNED_USER_OPTIONS", get_select_options_with_id(get_user_array(TRUE, "Active", $focus->assigned_user_id), $focus->assigned_user_id));
$xtpl->parse("main");
$xtpl->out("main");
require_once 'include/javascript/javascript.php';
$javascript = new javascript();
$javascript->setFormName('EditView');
$javascript->setSugarBean($focus);
示例3:
$xtpl->assign('ENCODED_POPUP_DATA', $json->encode($popup_data));
$xtpl->parse("main." . $section_name . ".merge_cell_edit_popup");
break;
case 'bool':
if (($select_row_curr_field_value == '1' || $select_row_curr_field_value == 'yes' || $select_row_curr_field_value == 'on') && !empty($select_row_curr_field_value)) {
$xtpl->assign("EDIT_FIELD_VALUE", " checked");
} else {
$xtpl->assign("EDIT_FIELD_VALUE", "");
}
$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;
示例4: XTemplate
function get_parameter_html($rp, $rpl)
{
global $app_strings;
global $current_language, $current_user, $theme;
$mod_strings = return_module_language($current_language, "ZuckerReportParameter");
$mod_list_strings = return_mod_list_strings_language($current_language, "ZuckerReportParameter");
$xtpl = new XTemplate('modules/ZuckerReportParameter/ParameterFill.html');
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
$xtpl->assign("THEME", $theme);
$selected_val = $rpl->default_value;
if (!empty($_REQUEST[$rpl->name])) {
$selected_val = $_REQUEST[$rpl->name];
}
if ($rp->range_name == 'SQL') {
$param_table = $rp->get_sql_table();
//asort($param_table);
if (is_array($param_table)) {
$xtpl->assign("PARAM_FRIENDLY_NAME", $rpl->friendly_name);
$xtpl->assign("PARAM_NAME", $rpl->name);
$xtpl->assign("PARAM_SELECTION", get_select_options_with_id($param_table, $selected_val));
$xtpl->parse("SQL");
$parameter_html = $xtpl->text("SQL");
} else {
$parameter_html = $param_table . "<br/>";
}
} else {
if ($rp->range_name == 'LIST') {
$list = $rp->get_list_table();
asort($list);
$xtpl->assign("PARAM_FRIENDLY_NAME", $rpl->friendly_name);
$xtpl->assign("PARAM_NAME", $rpl->name);
$xtpl->assign("PARAM_SELECTION", get_select_options_with_id($list, $selected_val));
$xtpl->parse("LIST");
$parameter_html = $xtpl->text("LIST");
} else {
if ($rp->range_name == 'DROPDOWN') {
$app_list_strings = return_app_list_strings_language($current_language);
$list = $rp->get_list_table();
$xtpl->assign("PARAM_FRIENDLY_NAME", $rpl->friendly_name);
$xtpl->assign("PARAM_NAME", $rpl->name);
asort($app_list_strings[$rp->range_options]);
$xtpl->assign("PARAM_SELECTION", get_select_options_with_id($app_list_strings[$rp->range_options], $selected_val));
$xtpl->parse("LIST");
$parameter_html = $xtpl->text("LIST");
} else {
if ($rp->range_name == 'SIMPLE') {
$xtpl->assign("PARAM_FRIENDLY_NAME", $rpl->friendly_name);
$xtpl->assign("PARAM_NAME", $rpl->name);
$xtpl->assign("PARAM_VALUE", $selected_val);
$xtpl->parse("SIMPLE");
$parameter_html = $xtpl->text("SIMPLE");
} else {
if ($rp->range_name == 'DATE') {
$timedate = new TimeDate();
$xtpl->assign("PARAM_FRIENDLY_NAME", $rpl->friendly_name);
$xtpl->assign("PARAM_NAME", $rpl->name);
$xtpl->assign("PARAM_VALUE", $selected_val);
$xtpl->assign("CALENDAR_LANG", "en");
$xtpl->assign("USER_DATEFORMAT", '(' . $timedate->get_user_date_format() . ')');
$xtpl->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
$xtpl->parse("DATE");
$parameter_html = $xtpl->text("DATE");
} else {
if ($rp->range_name == 'DATE_ADD' || $rp->range_name == 'DATE_SUB') {
$xtpl->assign("PARAM_FRIENDLY_NAME", $rpl->friendly_name);
$xtpl->assign("PARAM_NAME", $rpl->name);
$xtpl->assign("PARAM_VALUE", $selected_val);
$arr = split("::", $selected_val);
if (count($arr) == 2) {
$count = $arr[0];
$type = $arr[1];
} else {
$count = 0;
$type = NULL;
}
$xtpl->assign("PARAM_VALUE_COUNT", $count);
asort($mod_list_strings['PARAM_DATE_TYPES']);
$xtpl->assign("PARAM_SELECTION", get_select_options_with_id($mod_list_strings['PARAM_DATE_TYPES'], $type));
$xtpl->parse("DATE_CALC");
$parameter_html = $xtpl->text("DATE_CALC");
}
}
}
}
}
}
return $parameter_html;
}