Make WordPress Core

Changeset 2428


Ignore:
Timestamp:
03/10/2005 08:01:02 AM (21 years ago)
Author:
matt
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions-formatting.php

    r2341 r2428  
    620620    if ( empty($to) )
    621621        $to = time();
    622     $diff = (int) ($to - $from);
     622    $diff = (int) abs($to - $from);
    623623    if ($diff <= 3600) {
    624624        $mins = round($diff / 60);
Note: See TracChangeset for help on using the changeset viewer.