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 -2
View File
@@ -8,7 +8,7 @@ import { api } from '/api.js';
import { renderRRuleFields, bindRRuleEvents, getRRuleValues } from '/rrule-ui.js';
import { openModal as openSharedModal, closeModal, wireBlurValidation, btnSuccess, btnError } from '/components/modal.js';
import { stagger, vibrate } from '/utils/ux.js';
import { t } from '/i18n.js';
import { t, formatDate } from '/i18n.js';
// --------------------------------------------------------
// Konstanten
@@ -64,7 +64,7 @@ function formatDueDate(dateStr) {
if (diffDays < 0) return { label: t('tasks.overdueDay', { count: Math.abs(diffDays) }), cls: 'due-date--overdue' };
if (diffDays === 0) return { label: t('tasks.dueToday'), cls: 'due-date--today' };
if (diffDays === 1) return { label: t('tasks.dueTomorrow'), cls: '' };
return { label: due.toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit' }), cls: '' };
return { label: formatDate(due), cls: '' };
}
function groupBy(tasks, mode) {