From 0417260bf158c5d7b62888dae2e202b0de115a05 Mon Sep 17 00:00:00 2001 From: Minteck Date: Wed, 10 Aug 2022 00:04:25 +0200 Subject: Initial commit --- includes/subsysedit.php | 172 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 includes/subsysedit.php (limited to 'includes/subsysedit.php') diff --git a/includes/subsysedit.php b/includes/subsysedit.php new file mode 100644 index 0000000..a19683d --- /dev/null +++ b/includes/subsysedit.php @@ -0,0 +1,172 @@ += 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} "; +} + +?> + +
+
+ +
+ +

+ Saved · bytes +

+ + + + + + + + +
+ + \ No newline at end of file -- cgit