= 0) { return $tense = 'just now'; } elseif ($difference > 0) { $tense = 'ago'; } else { $tense = 'later'; } for ($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) { $difference /= $lengths[$j]; } $difference = round($difference); $period = $periods[$j] . ($difference >1 ? 's' :''); return "{$difference} {$period} {$tense} "; } require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/Parsedown.php"; global $Parsedown; $Parsedown = new Parsedown();