Why would this not work as a Views PHP filter criteria?
if (arg(0) == 'node' && is_numeric(arg(1)) && ! arg(2)) {
$node = node_load(arg(1));
$a1 = format_date($node->created, 'custom', 'm/d/Y');
$a2 = date('m/d/Y',strtotime('-2 months',strtotime($a1)));
$a3 = format_date($row->created, 'custom', 'm/d/Y');
$b1 = new DateTime($a1);
$b2 = new DateTime($a2);
$b3 = new DateTime($a3);
if ($b3 < $b2) {
return TRUE;
}
}
The code should remove rows that are older than the current node except it doesn't?!