- date_diff: documentation ( source)
- var_dump: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$di = date_diff(\DateTime::createFromFormat('U', 1391209200), \DateTime::createFromFormat('U', 1393628400));
var_dump($di);
echo date('Y-m-d H:i:s', 1393628400)."\n";
$fe = \DateTime::createFromFormat('U', 1391209200);
$fe->add(new \DateInterval('P1M'));
echo $fe->format('Y-m-d H:i:s')."\n";
$p1m = strtotime('+1 month', 1391209200);
echo "$p1m\n";
echo date('Y-m-d H:i:s', $p1m)."\n";