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:
parent
4cd9ea1d27
commit
2bc77d4189
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue