Date: Hide seconds if smth was created today or yesterday

This commit is contained in:
veselcraft 2022-01-24 16:15:27 +03:00
parent b9f4cedca5
commit 4ae74841e0
No known key found for this signature in database
GPG key ID: AED66BC1AC628A4E

View file

@ -25,7 +25,7 @@ class DateTime
if($this->timestamp >= strtotime("midnight")) { # Today
if($diff->h >= 1)
return tr("time_today") . tr("time_at_sp") . ovk_strftime_safe("%X", $this->timestamp);
return tr("time_today") . tr("time_at_sp") . ovk_strftime_safe(" %R %p", $this->timestamp);
else if($diff->i < 2)
return tr("time_just_now");
else