$dStart = new DateTime('2013-11-26');
$dEnd = new DateTime(date('Y-m-d'));
$dDiff = $dStart->diff($dEnd);
//Date difference in days
$date_diff_days = $dDiff->days;
Another Method
$now = time();
$your_date = strtotime('2013-11-26');
$datediff = $now - $your_date;
$date_diff_daysfloor($ datediff/(60*60*24));
$dEnd = new DateTime(date('Y-m-d'));
$dDiff = $dStart->diff($dEnd);
//Date difference in days
$date_diff_days = $dDiff->days;
Another Method
$now = time();
$your_date = strtotime('2013-11-26');
$datediff = $now - $your_date;
$date_diff_daysfloor($
No comments:
Post a Comment