mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-31 01:50:47 +03:00
Reformat dates
Co-authored-by: DeepBlueV7.X <nicolas.werner@hotmail.de>
This commit is contained in:
parent
330b9d62a5
commit
3cb4209d7b
1 changed files with 4 additions and 3 deletions
|
@ -106,13 +106,14 @@ ReadReceiptsModel::dateFormat(const QDateTime &then) const
|
||||||
auto days = then.daysTo(now);
|
auto days = then.daysTo(now);
|
||||||
|
|
||||||
if (days == 0)
|
if (days == 0)
|
||||||
return tr("Today %1")
|
return tr("Today, %1")
|
||||||
.arg(QLocale::system().toString(then.time(), QLocale::ShortFormat));
|
.arg(QLocale::system().toString(then.time(), QLocale::ShortFormat));
|
||||||
else if (days < 2)
|
else if (days < 2)
|
||||||
return tr("Yesterday %1")
|
return tr("Yesterday, %1")
|
||||||
.arg(QLocale::system().toString(then.time(), QLocale::ShortFormat));
|
.arg(QLocale::system().toString(then.time(), QLocale::ShortFormat));
|
||||||
else if (days < 7)
|
else if (days < 7)
|
||||||
return QString("%1 %2")
|
//: %1 is the name of the current day, %2 is the time the read receipt was read. The result may look like this: Monday, 7:15
|
||||||
|
return QString("%1, %2")
|
||||||
.arg(then.toString("dddd"))
|
.arg(then.toString("dddd"))
|
||||||
.arg(QLocale::system().toString(then.time(), QLocale::ShortFormat));
|
.arg(QLocale::system().toString(then.time(), QLocale::ShortFormat));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue