[Code-Quality] DRY: Datums-/Helper-Duplikate in utils.js zentralisieren #12
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Schweregrad: MEDIUM
Dateien: ISO-Bau
js/calendar.js:122,141,180,190; Weekday inlinejs/calendar.js:181,191;DD.MM.YYYYjs/excel.js:25,js/history.js:127,js/calendar.js:313; Name-Mapjs/calendar.js:151,js/excel.js:14,js/history.js:105Problem:
toISO/getWeekdayexistieren injs/algorithm.js, werden aber nicht exportiert/wiederverwendet; mehrfache Reimplementierungen.Fix: Gemeinsame Helfer (
toISO,getWeekday,formatDateDE,buildNameMap) injs/utils.jsziehen und überall importieren.Behoben in
fd98708: neuesjs/utils.jsmittoISO,monthPrefix,getWeekday,formatDateDE,buildNameMap.algorithm.js,calendar.js,excel.js,history.jsimportieren diese statt ISO-Bau, Weekday-Logik, DD.MM.YYYY-Formatierung und id→name-Map mehrfach inline zu reimplementieren. Inkl.tests/utils.test.mjs(auch innpm testverdrahtet).