Documentation

XMLDate2Dec

Description and parameters

string
CIBlockRSS::XMLDate2Dec(  string dateXML, string dateFormat= "DD.MM.YYYY" );

Converts data from RSS format to the format "DD.MM.YYYY". Non-static method.

Note: under date's RSS format is the format, described to rfc 822.

Call parameters

Parameter DescriptionAvailable from version
dateXML RSS date/time.
dateFormat Date format. Optional parameter. Default format "DD.MM.YYYY".

Returned value

string.

See Also

Examples

<?
$arXML = CIBlockRSS::GetNewsEx('www.1c-bitrix.ru', '80', '/bitrix/rss.php', 'ID=news_sm&LANG=ru&TYPE=news&LIMIT=5');
if(count($arXML) > 0)
{
$arRSS = CIBlockRSS::FormatArray($arXML);
foreach($arRSS["item"] as $arItem)
{
echo $arItem["title"].":".CIBlockRSS::XMLDate2Dec($arItem["pubDate"]);
}
}
?>

© «Bitrix24», 2001-2024