How do I select last 4 events that end 7 days in the past. Ie they stay on the homepage 7 days after the actual event.
This dosnt work, its returning all of them! am i on the right track??
function UpcomingEvents(){
$lastweek = mktime(0, 0, 0, date("m"), date("d")-7, date("Y"));
Debug::message($lastweek);
return DataObject::get("EventPage", "`EventPage`.`Date` > '{$lastweek}'", "Date DESC", "", 4);
}