Use PHP 8 'str_' functions.

A few more characters in some places, but helps with readability.
This commit is contained in:
wn_
2024-11-23 18:23:49 +00:00
parent 53fee911e6
commit 667528d5b9
32 changed files with 67 additions and 70 deletions

View File

@@ -9,7 +9,7 @@ class TimeHelper {
return T_sprintf("%d min", date("i", time() + $tz_offset - $timestamp));
} else if (date("Y.m.d", $timestamp) == date("Y.m.d", time() + $tz_offset)) {
$format = Prefs::get(Prefs::SHORT_DATE_FORMAT, $owner_uid, $profile);
if (strpos((strtolower($format)), "a") === false)
if (!str_contains((strtolower($format)), "a"))
return date("G:i", $timestamp);
else
return date("g:i a", $timestamp);