Past and future time diffs, hat tip Eric Meyer. http://mosquito.wordpress.org/view.php?id=1059

git-svn-id: http://svn.automattic.com/wordpress/trunk@2428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2005-03-10 08:01:02 +00:00
parent 4cd9ea1d27
commit 2bc77d4189

View File

@ -619,7 +619,7 @@ function sanitize_email($email) {
function human_time_diff( $from, $to = '' ) {
if ( empty($to) )
$to = time();
$diff = (int) ($to - $from);
$diff = (int) abs($to - $from);
if ($diff <= 3600) {
$mins = round($diff / 60);
if ($mins <= 1)