Update lib/private/DateTimeFormatter.php

Co-authored-by: Louis <6653109+artonge@users.noreply.github.com>
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
This commit is contained in:
Hamid Dehnavi 2023-09-05 16:18:46 +03:30 committed by GitHub
parent 495683c358
commit 9b92c1abe4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,7 +125,7 @@ class DateTimeFormatter implements \OCP\IDateTimeFormatter {
* @return string Formatted relative date string
*/
public function formatDateRelativeDay($timestamp, $format = 'long', \DateTimeZone $timeZone = null, \OCP\IL10N $l = null) {
if (!str_ends_with($format, '*')) {
if (!str_ends_with($formatDate, '^') && !str_ends_with($formatDate, '*')) {
$format .= '^';
}