Compare commits

...

2 Commits

Author SHA1 Message Date
Karson 9bdf43e808
!481 修复本地时间参数无效、修复 __ 函数的参数传递错误
Merge pull request !481 from 一半/develop
2025-01-03 03:02:38 +00:00
一半 8fe9f5954c
修复本地时间参数无效、修复 __ 函数的参数传递错误
Signed-off-by: 一半 <1094963513@qq.com>
2025-01-01 23:49:59 +00:00
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' : '')]);
}
/**