Forum
Filtering events for current week
I want to display events for the current week. This code (with the dates hardcoded) displays the events.
perch_events_custom(array(
'filter'=>'eventDateTime',
'match'=>'eqbetween',
'value' => '2015-08-30, 2015-09-06',
'sort'=>'eventDateTime',
'sort-order'=>'desc',
'template'=>'listing/banner-listing.html'
));
<perch:events id="eventDateTime" type="date" format="oW" />
displays current week number (201536 for this week).
Is there a way to use oW to filter dates. I've tried
'match'=>'eq',
'value' => date('oW'),
but that doesn't work. John
You need to pass in ISO-format dates - so you'll need to find the date of the closest Monday and add 7 days to that.