Documentation

GetListCalendar

Array
CBlogPost::GetListCalendar(
 int blogID,
 int year = false,
 int month = false,
 int day = false
);

Returns list of arrays that contain days, on which the blog posts were published at the blog with blogID, with an option to limit search by day, month and a year. Non-static method.

Method parameters

ParameterDescription
blogID Blog ID.
year Year. The year for which the days, when posts were made, must be found. Accepts both year values as two-digit number (when its read as 20xx year) and year value with four-digit number
Optional. By default records are not filtered.
month Month. The month for which the days, when posts were made, must be found. The year parameter must be specified to filter by the month.
Optional. By default records are not filtered.
day Day. Allows to verify, if there were any posts made during this day. The year and month parameters. must be specified to filter by the day.
Optional. By default, records are not filtered.

Returned value

Array of the following type is returned:
Array(
 [0] => Array
        (
            [YEAR] => 2007
            [MONTH] => 07
            [DAY] => 17
            [DATE] => 17.07.2007
        )[,
 ...]
)

See Also

Examples of use

<?
// select data for the April 2007 for the blog's calendar 
// with ID 1


$arDates = CBlogPost::GetListCalendar(
        1,
        '06',
        '4'
    );

print_r($arDates);
?>


© «Bitrix24», 2001-2024
Up