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

git-svn-id: https://develop.svn.wordpress.org/trunk@2428 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2005-03-10 08:01:02 +00:00
parent e1eb496fac
commit cac1655fae

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)