From 71d15964fd12dc53567a5a99438f3fe26382c0f3 Mon Sep 17 00:00:00 2001 From: Karson Date: Mon, 17 Feb 2025 14:47:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A5=E6=9C=9F=E6=B8=B2?= =?UTF-8?q?=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/fast/Date.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extend/fast/Date.php b/extend/fast/Date.php index ce018f1b..7a7e1f89 100644 --- a/extend/fast/Date.php +++ b/extend/fast/Date.php @@ -124,7 +124,7 @@ class Date */ public static function human($remote, $local = null) { - $time_diff = (is_null($local) || $local ? time() : $local) - $remote; + $time_diff = (is_null($local) ? time() : $local) - $remote; $tense = $time_diff < 0 ? 'after' : 'ago'; $time_diff = abs($time_diff); $chunks = [ @@ -146,7 +146,7 @@ class Date break; } } - return __("%d $name%s $tense", $count, ($count > 1 ? 's' : '')); + return __("%d $name%s $tense", [$count, ($count > 1 ? 's' : '')]); } /**