feat: replace manual date formatting with formatDate/formatTime from i18n

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ulas
2026-03-31 23:24:21 +02:00
parent 3aefca0a44
commit 66a9bdfa44
6 changed files with 27 additions and 43 deletions
+2 -3
View File
@@ -8,7 +8,7 @@
import { api } from '/api.js';
import { openModal as openSharedModal, closeModal } from '/components/modal.js';
import { stagger, vibrate } from '/utils/ux.js';
import { t } from '/i18n.js';
import { t, formatDate } from '/i18n.js';
// --------------------------------------------------------
// Konstanten
@@ -324,8 +324,7 @@ function renderTrend(current, prev, prevLabel) {
}
function formatEntryDate(dateStr) {
const d = new Date(dateStr + 'T00:00:00');
return `${d.getDate().toString().padStart(2, '0')}.${(d.getMonth() + 1).toString().padStart(2, '0')}.`;
return formatDate(new Date(dateStr + 'T00:00:00'));
}
// --------------------------------------------------------