diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-09-17 02:27:31 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-09-17 02:27:31 +0200 |
commit | c2443ad1f223f0846dd138f03c2e52665a1b8345 (patch) | |
tree | 40425d538ee02931cc7838a0302c1b72a543a7b1 /lib | |
parent | 0759b481e6ce7a53c01653a331f92dbfaa142342 (diff) | |
download | nextcloud-server-c2443ad1f223f0846dd138f03c2e52665a1b8345.tar.gz nextcloud-server-c2443ad1f223f0846dd138f03c2e52665a1b8345.zip |
chore: Replace DI alias with real classchore/remove-deprecated-aliases
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/template/functions.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/legacy/template/functions.php b/lib/private/legacy/template/functions.php index 87b91639fd3..a9a1f10a116 100644 --- a/lib/private/legacy/template/functions.php +++ b/lib/private/legacy/template/functions.php @@ -5,6 +5,8 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + +use OCP\IDateTimeFormatter; use OCP\Util; function p($string) { @@ -280,9 +282,8 @@ function strip_time($timestamp) { * @param bool|null $dateOnly whether to strip time information * @return string timestamp */ -function relative_modified_date($timestamp, $fromTime = null, $dateOnly = false) { - /** @var \OC\DateTimeFormatter $formatter */ - $formatter = \OCP\Server::get('DateTimeFormatter'); +function relative_modified_date($timestamp, $fromTime = null, $dateOnly = false): string { + $formatter = \OCP\Server::get(IDateTimeFormatter::class); if ($dateOnly) { return $formatter->formatDateSpan($timestamp, $fromTime); |