From e95b208af90cc386a7d8d1bcab426727cf4f0121 Mon Sep 17 00:00:00 2001 From: Minteck Date: Wed, 21 Sep 2022 22:42:33 +0200 Subject: Update time --- includes/footer.php | 33 +++------------------------------ 1 file changed, 3 insertions(+), 30 deletions(-) (limited to 'includes/footer.php') diff --git a/includes/footer.php b/includes/footer.php index 4592b8e..720881a 100644 --- a/includes/footer.php +++ b/includes/footer.php @@ -1,35 +1,6 @@ = 0) { - return $tense = "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/functions.php"; ?> @@ -58,5 +29,7 @@ if (!function_exists("timeAgo")) { }) + + \ No newline at end of file -- cgit