UI: Statistics: Traffic: Tweak time formats

This commit is contained in:
Nodir Temirkhodjaev 2024-02-25 12:41:27 +03:00
parent 3e70b4074a
commit cfb8aac910
2 changed files with 4 additions and 4 deletions

View File

@ -220,14 +220,14 @@ QString TrafListModel::formatTrafTime(qint32 trafTime) const
const qint64 unixTime = DateUtil::toUnixTime(trafTime);
switch (m_type) {
case TrafTotal:
Q_FALLTHROUGH();
case TrafHourly:
return DateUtil::formatHour(unixTime);
case TrafDaily:
return DateUtil::formatDay(unixTime);
case TrafMonthly:
return DateUtil::formatMonth(unixTime);
case TrafTotal:
return DateUtil::formatHour(unixTime);
}
return QString();
}

View File

@ -67,12 +67,12 @@ QString DateUtil::formatHour(qint64 unixTime)
QString DateUtil::formatDay(qint64 unixTime)
{
return formatDateTime(unixTime, "dd MMMM yyyy");
return formatDateTime(unixTime, "dd-MMM-yyyy");
}
QString DateUtil::formatMonth(qint64 unixTime)
{
return formatDateTime(unixTime, "MMMM yyyy");
return formatDateTime(unixTime, "MMM-yyyy");
}
QString DateUtil::formatDateTime(qint64 unixTime, const QString &format)