From 45aa0e8dfba2a51d26b6a4fe4990a1686ab4af65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Wed, 7 Sep 2022 19:23:17 +0200 Subject: [PATCH] xP: remember to differentiate today --- xP/public/xP.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xP/public/xP.js b/xP/public/xP.js index 0a939c2..a941752 100644 --- a/xP/public/xP.js +++ b/xP/public/xP.js @@ -402,6 +402,10 @@ let Buffer = { lines.push(m('.time', {...attrs}, date.toLocaleTimeString())) lines.push(m(Content, {...attrs}, line)) }) + + let dateMark = new Date().toLocaleDateString() + if (dateMark !== lastDateMark) + lines.push(m('.date', {}, dateMark)) return m('.buffer', {}, lines) }, }