From 3e1ff77a0e0c1053cebede11ed2b82133d1c21cd Mon Sep 17 00:00:00 2001 From: saxmatt Date: Mon, 24 Jan 2005 06:01:04 +0000 Subject: [PATCH] Handle time_diff less than a minute http://mosquito.wordpress.org/view.php?id=737 git-svn-id: http://svn.automattic.com/wordpress/trunk@2124 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions-formatting.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/functions-formatting.php b/wp-includes/functions-formatting.php index 806525242b..d057167f4b 100644 --- a/wp-includes/functions-formatting.php +++ b/wp-includes/functions-formatting.php @@ -620,7 +620,10 @@ function human_time_diff( $from, $to = '' ) { $diff = (int) ($to - $from); if ($diff <= 3600) { $mins = round($diff / 60); - $since = sprintf( __('%s mins'), $mins); + if ($mins <= 1) + $since = __('1 min'); + else + $since = sprintf( __('%s mins'), $mins); } else if (($diff <= 86400) && ($diff > 3600)) { $hours = round($diff / 3600); if ($hours <= 1)