setDate(2018, 1, 31); $dt->add(new DateInterval('P1M')); $dt->sub(new DateInterval('P1M')); echo $dt->format('d/m/Y'); ?>