- date: documentation ( source)
- strtotime: documentation ( source)
<?php
echo $drst = strtotime('-3 days', strtotime('2013-10-31 00:00:00'));
echo "\r\n";
echo $drstRev = strtotime('-1 month', $drst);
echo "\r\n";
echo date('Y-m-d', $drstRev);
echo "\r\n";
echo $drst = strtotime('2013-10-30 00:00:00');
echo "\r\n";
echo $drstRev = strtotime('-1 month', $drst);
echo "\r\n";
echo date('Y-m-d', $drstRev);
?>