fix: replace hardcoded Uhr suffix and use getLocale() in budget

This commit is contained in:
Ulas
2026-03-31 23:27:44 +02:00
parent 66a9bdfa44
commit 26a8434369
3 changed files with 7 additions and 5 deletions
+2 -2
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, formatDate } from '/i18n.js';
import { t, formatDate, getLocale } from '/i18n.js';
// --------------------------------------------------------
// Konstanten
@@ -34,7 +34,7 @@ const CATEGORY_LABELS = () => ({
function getMonthName(monthIndex) {
// monthIndex: 0-based (0=Januar, 11=Dezember)
const date = new Date(2000, monthIndex, 1);
return new Intl.DateTimeFormat(document.documentElement.lang || 'de', { month: 'long' }).format(date);
return new Intl.DateTimeFormat(getLocale(), { month: 'long' }).format(date);
}
// --------------------------------------------------------