- date: documentation ( source)
- strtotime: documentation ( source)
<?php
echo date('Y-m-d', strtotime('March, 26 2014 00:00:00+0000'))."\n";
$dateTime1 = new DateTime(date('Y-m-d', strtotime('March, 26 2014 00:00:00+0000')));
$dateTime2 = new DateTime(date('Y-m-d', strtotime('March, 05 2014 00:00:00+0000')));
$difference = $dateTime1->diff($dateTime2);
echo (int)$difference->format('%a');