/** * formatters (German UI) * * These helpers are used purely for user-facing labels. * They remain pure, testable, and independent from React/Next. */ const MONTHS_DE = Object.freeze([ "Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember", ]); export function getGermanMonthName(month) { const m = Number.parseInt(String(month), 10); if (!Number.isInteger(m) || m < 1 || m > 12) return null; return MONTHS_DE[m - 1]; } export function formatMonthLabel(month) { const name = getGermanMonthName(month); const mm = String(month).padStart(2, "0"); return name ? `${name} (${mm})` : mm; }