From 2bc77d418981d0ef7ea5573521a63bb1947cec90 Mon Sep 17 00:00:00 2001 From: matt Date: Thu, 10 Mar 2005 08:01:02 +0000 Subject: [PATCH] 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 --- wp-includes/functions-formatting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/functions-formatting.php b/wp-includes/functions-formatting.php index 9f977970f3..0a83dbe5ad 100644 --- a/wp-includes/functions-formatting.php +++ b/wp-includes/functions-formatting.php @@ -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)