Dateien nach "frontend/src/tools" hochladen
This commit is contained in:
@@ -388,7 +388,9 @@ function InfoBox({ color, children }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function formatMsgTime(isoStr) {
|
function formatMsgTime(isoStr) {
|
||||||
const d = new Date((isoStr || '').replace(' ', 'T'));
|
if (!isoStr) return '';
|
||||||
|
const d = new Date(isoStr.replace(' ', 'T'));
|
||||||
|
if (isNaN(d)) return '';
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const isToday = d.toDateString() === now.toDateString();
|
const isToday = d.toDateString() === now.toDateString();
|
||||||
const isThisYear = d.getFullYear() === now.getFullYear();
|
const isThisYear = d.getFullYear() === now.getFullYear();
|
||||||
|
|||||||
Reference in New Issue
Block a user