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


PHP CComponentUtil::GetDateTimeFormatDefault方法代码示例

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


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

示例1: GetDateTimeFormatField

 public static function GetDateTimeFormatField($name = "", $parent = "")
 {
     $timestamp = mktime(16, 10, 45, 2, 6, 2010);
     return array("PARENT" => $parent, "NAME" => $name, "TYPE" => "LIST", "VALUES" => array("d-m-Y H:i:s" => FormatDate("d-m-Y H:i:s", $timestamp), "m-d-Y H:i:s" => FormatDate("m-d-Y H:i:s", $timestamp), "Y-m-d H:i:s" => FormatDate("Y-m-d H:i:s", $timestamp), "d.m.Y H:i:s" => FormatDate("d.m.Y H:i:s", $timestamp), "m.d.Y H:i:s" => FormatDate("m.d.Y H:i:s", $timestamp), "j M Y H:i:s" => FormatDate("j M Y H:i:s", $timestamp), "M j, Y H:i:s" => FormatDate("M j, Y H:i:s", $timestamp), "j F Y H:i:s" => FormatDate("j F Y H:i:s", $timestamp), "f j, Y H:i:s" => FormatDate("f j, Y H:i:s", $timestamp), "d.m.y g:i:s A" => FormatDate("d.m.y g:i:s A", $timestamp), "d.M.y g:i:s a" => FormatDate("d.M.y g:i:s a", $timestamp), "d.M.Y g:i:s a" => FormatDate("d.M.Y g:i:s a", $timestamp), "d.m.y G:i" => FormatDate("d.m.y G:i", $timestamp), "j F Y G:i" => FormatDate("j F Y G:i", $timestamp), "j F Y g:i a" => FormatDate("j F Y g:i a", $timestamp), "FULL" => GetMessage('COMP_PARAM_DATETIME_FORMAT_SITE')), "DEFAULT" => CComponentUtil::GetDateTimeFormatDefault(), "ADDITIONAL_VALUES" => "Y");
 }
开发者ID:rasuldev,项目名称:torino,代码行数:5,代码来源:component_util.php

示例2: GetDateTimeFormatField

	function GetDateTimeFormatField($name="", $parent="")
	{
		$timestamp = mktime(16,10,45,2,6,2010);
		return array(
			"PARENT" => $parent,
			"NAME" => $name,
			"TYPE" => "LIST",
			"VALUES" => array(
				"d-m-Y H:i:s" => FormatDate("d-m-Y H:i:s", $timestamp),//"22-02-2007 7:30",
				"m-d-Y H:i:s" => FormatDate("m-d-Y H:i:s", $timestamp),//"02-22-2007 7:30",
				"Y-m-d H:i:s" => FormatDate("Y-m-d H:i:s", $timestamp),//"2007-02-22 7:30",
				"d.m.Y H:i:s" => FormatDate("d.m.Y H:i:s", $timestamp),//"22.02.2007 7:30",
				"m.d.Y H:i:s" => FormatDate("m.d.Y H:i:s", $timestamp),//"02.22.2007 7:30",
				"j M Y H:i:s" => FormatDate("j M Y H:i:s", $timestamp),//"22 Feb 2007 7:30",
				"M j, Y H:i:s" => FormatDate("M j, Y H:i:s", $timestamp),//"Feb 22, 2007 7:30",
				"j F Y H:i:s" => FormatDate("j F Y H:i:s", $timestamp),//"22 February 2007 7:30",
				"f j, Y H:i:s" => FormatDate("f j, Y H:i:s", $timestamp),//"February 22, 2007",
				"d.m.y g:i:s A" => FormatDate("d.m.y g:i:s A", $timestamp),//"22.02.07 1:30 PM",
				"d.M.y g:i:s a" => FormatDate("d.M.y g:i:s a", $timestamp),//"22.‘ев.07 1:30 pm",
				"d.M.Y g:i:s a" => FormatDate("d.M.Y g:i:s a", $timestamp),//"22.‘ев.2007 1:30 pm",
				"d.m.y G:i" => FormatDate("d.m.y G:i", $timestamp),//"22.02.07 7:30",
				"d.m.Y H:i:s" => FormatDate("d.m.Y H:i:s", $timestamp),//"22.02.2007 07:30",
				"j F Y G:i" => FormatDate("j F Y G:i", $timestamp),//"ZHL cool RUS",
				"j F Y g:i a" => FormatDate("j F Y g:i a", $timestamp),//"ZHL cool Burzh",
				"FULL" => GetMessage('COMP_PARAM_DATETIME_FORMAT_SITE')
			),
			"DEFAULT" => CComponentUtil::GetDateTimeFormatDefault(),
			"ADDITIONAL_VALUES" => "Y",
		);
	}
开发者ID:nProfessor,项目名称:Mytb,代码行数:30,代码来源:component_util.php

示例3: array

$arParams['SHOW_LOGIN'] = $arParams['SHOW_LOGIN'] != "N" ? "Y" : "N";
if (!array_key_exists("PM_URL", $arParams)) {
    $arParams["~PM_URL"] = $arParams["PM_URL"] = "/company/personal/messages/chat/#USER_ID#/";
}
if (!array_key_exists("PATH_TO_CONPANY_DEPARTMENT", $arParams)) {
    $arParams["~PATH_TO_CONPANY_DEPARTMENT"] = $arParams["PATH_TO_CONPANY_DEPARTMENT"] = "/company/structure.php?set_filter_structure=Y&structure_UF_DEPARTMENT=#ID#";
}
if (IsModuleInstalled("video") && !array_key_exists("PATH_TO_VIDEO_CALL", $arParams)) {
    $arParams["~PATH_TO_VIDEO_CALL"] = $arParams["PATH_TO_VIDEO_CALL"] = "/company/personal/video/#USER_ID#/";
}
$arParams['SHOW_YEAR'] = $arParams['SHOW_YEAR'] == 'Y' ? 'Y' : ($arParams['SHOW_YEAR'] == 'M' ? 'M' : 'N');
if (!$arParams['DATE_FORMAT']) {
    $arParams['DATE_FORMAT'] = CComponentUtil::GetDateFormatDefault();
}
if (!$arParams['DATE_TIME_FORMAT']) {
    $arParams['DATE_TIME_FORMAT'] = CComponentUtil::GetDateTimeFormatDefault();
}
$arResult['MODES_LIST'] = array('now', 'today', 'tomorrow');
$arParams['mode'] = $_GET['absence_mode'];
if (!in_array($arParams['mode'], $arResult['MODES_LIST'])) {
    //$arParams['mode'] = 'all';
    $arParams['mode'] = 'now';
}
if (!isset($arParams["CACHE_TIME"])) {
    $arParams["CACHE_TIME"] = 3600;
}
if (!isset($arParams["CACHE_TYPE"])) {
    $arParams["CACHE_TYPE"] = 'A';
}
if ($this->StartResultCache(false, $arParams['mode'] . '|' . ($arParams['DEPARTMENT'] > 0 ? $arParams['DEPARTMENT'] : ''))) {
    global $CACHE_MANAGER;
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例4: array

        $arParams['CALENDAR_IBLOCK_ID'] = COption::GetOptionInt('intranet', 'iblock_calendar');
    }
}
$arResult['ABSENCE_TYPES'] = array();
$dbTypeRes = CIBlockPropertyEnum::GetList(array("SORT" => "ASC", "VALUE" => "ASC"), array('IBLOCK_ID' => $arParams['IBLOCK_ID'], 'PROPERTY_ID' => 'ABSENCE_TYPE'));
while ($arTypeValue = $dbTypeRes->GetNext()) {
    $arResult['ABSENCE_TYPES'][$arTypeValue['ID']] = $arTypeValue;
}
$arParams['NAME_TEMPLATE'] = empty($arParams['NAME_TEMPLATE']) ? CSite::GetNameFormat(false) : str_replace(array("#NOBR#", "#/NOBR#"), array("", ""), $arParams["NAME_TEMPLATE"]);
if (!$arParams['DATE_FORMAT']) {
    $arParams['DATE_FORMAT'] = isset($_SESSION['intranet_absence_calendar_date_format']) ? $_SESSION['intranet_absence_calendar_date_format'] : CComponentUtil::GetDateFormatDefault();
} elseif (!$arParams['AJAX_CALL']) {
    $_SESSION['intranet_absence_calendar_date_format'] = $arParams['DATE_FORMAT'];
}
if (!$arParams['DATETIME_FORMAT']) {
    $arParams['DATETIME_FORMAT'] = isset($_SESSION['intranet_absence_calendar_datetime_format']) ? $_SESSION['intranet_absence_calendar_datetime_format'] : CComponentUtil::GetDateTimeFormatDefault();
} elseif (!$arParams['AJAX_CALL']) {
    $_SESSION['intranet_absence_calendar_datetime_format'] = $arParams['DATETIME_FORMAT'];
}
if ($arParams['AJAX_CALL'] == 'DATA') {
    if (!check_bitrix_sessid()) {
        return;
    }
    if ($arParams['IBLOCK_ID'] <= 0) {
        return;
    }
    $arParams['FILTER_SECTION_CURONLY'] = $arParams['FILTER_SECTION_CURONLY'] == 'Y' ? 'Y' : 'N';
    $arParams['DETAIL_URL'] = COption::GetOptionString('intranet', 'search_user_url', '/company/personal/user/#ID#/', $arParams['SITE_ID']);
    $arParams['CALLBACK'] = trim($arParams['CALLBACK']);
    $arParams['TS_START'] = date('U', $arParams['TS_START']);
    $arParams['TS_FINISH'] = date('U', $arParams['TS_FINISH']);
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php


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