Fix date formatting if not today nor yesterday
This commit is contained in:
parent
a7bea5323f
commit
2883b53ec5
1 changed files with 1 additions and 1 deletions
|
|
@ -264,7 +264,7 @@ QString Utils::formatDate(const QDateTime &date, bool includeTime) {
|
|||
else if (date.date() == QDate::currentDate().addDays(-1)) dateDay = tr("Hier");
|
||||
else {
|
||||
QString format = date.date().year() == QDateTime::currentDateTime().date().year() ? "dd MMMM" : "dd MMMM yyyy";
|
||||
auto dateDay = tr(date.date().toString(format).toLocal8Bit().data());
|
||||
dateDay = tr(date.date().toString(format).toLocal8Bit().data());
|
||||
}
|
||||
if (!includeTime) return dateDay;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue