In PHP I have:
$diff = abs(strtotime(date('m/d/Y h:i:s')) - strtotime($latest));
$years = floor($diff / (365*60*60*24));
$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));
echo floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));
How do I get the difference in seconds? I've tried the following:
$diff = abs(strtotime(date('m/d/Y h:i:s')) - strtotime($latest));