parent
4fb18e7cac
commit
1a468a144b
|
@ -21,15 +21,6 @@ StatusBaseText {
|
||||||
if (prevMsgDate > 0 && currentMsgDate.getDay() === prevMsgDate.getDay())
|
if (prevMsgDate > 0 && currentMsgDate.getDay() === prevMsgDate.getDay())
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
const now = new Date();
|
|
||||||
if (now.getFullYear() == currentMsgDate.getFullYear() && now.getMonth() == currentMsgDate.getMonth() && now.getDate() == currentMsgDate.getDate())
|
|
||||||
return qsTr("Today");
|
|
||||||
|
|
||||||
const yesterday = new Date();
|
|
||||||
yesterday.setDate(now.getDate() - 1);
|
|
||||||
if (yesterday.getFullYear() == currentMsgDate.getFullYear() && yesterday.getMonth() == currentMsgDate.getMonth() && yesterday.getDate() == currentMsgDate.getDate())
|
|
||||||
return qsTr("Yesterday");
|
|
||||||
|
|
||||||
// FIXME Qt6: replace with Intl.DateTimeFormat
|
// FIXME Qt6: replace with Intl.DateTimeFormat
|
||||||
const monthName = Qt.locale().standaloneMonthName(currentMsgDate.getMonth(), Locale.LongFormat)
|
const monthName = Qt.locale().standaloneMonthName(currentMsgDate.getMonth(), Locale.LongFormat)
|
||||||
if (now.getFullYear() > currentMsgDate.getFullYear())
|
if (now.getFullYear() > currentMsgDate.getFullYear())
|
||||||
|
|
Loading…
Reference in New Issue