- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$a = new DateTime('2015-1-31');
$b = new DateTime('2015-1-31 14:45');
$a->add(new DateInterval('P6Y'));
echo $a->format('Y-m-d');
echo date('Y-m-d', strtotime('+1 month', strtotime('2015-1-31')));
echo $a < $b ? 'ja' : 'nein';