filter by date time attribute: month

Permalink
Is there any (simple) way to filter the date time attribute by month?

$pl->filterByAttribute($attributeKeyHandle, $value, $comparison)


I sort of wanted to do something like:
$pl->filterByAttribute('event_date_time','january')


But then I realized that wouldn't work because the attribute is a timestamp...

 
nicolechung replied on at Permalink Reply
Used php's "intval" method:

foreach($eResults as $cobj) {
                     $str = $cobj->getAttribute('event_date_time');
                     $date = strtotime($str);
                     $month = intval(date('m', $date));
                     if ($month == 6) {
// do stuff for "june"
}
}
nickratering replied on at Permalink Reply
nickratering
Hello,

I would like to have a pagelist like this:

JANUARY
- page 1
- page 2
- page 3
- page 4

FEBRUARY
- page 4
- page 5
- page 6
- page 7

MARCH
- etc...

Does anybody know how to split the pages by months? (C5.6.1)
What would be the $pages loop?

EDIT: Figured this out by using the years and months from the date nav block!

Best wishes,
Nick