From a42aac134505f928b699c814a3117e013273baec Mon Sep 17 00:00:00 2001 From: Matt Mullenweg 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: https://develop.svn.wordpress.org/trunk@2124 602fd350-edb4-49c9-b593-d223f7449a82 --- 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)