修复日期渲染

pull/490/head
Karson 2025-02-17 14:47:12 +08:00
parent 7a81b078f3
commit 71d15964fd
1 changed files with 2 additions and 2 deletions

View File

@ -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' : '')]);
}
/**