Umstellung auf h min format

This commit is contained in:
2026-02-13 15:24:04 +01:00
parent af1f6efb40
commit 5e188cace2
5 changed files with 10 additions and 10 deletions

View File

@@ -134,7 +134,7 @@ function getWeekStart(dateStr) {
// Helper: Dezimalstunden in Anzeige "X h Y min" (z. B. 8.25 -> "8 h 15 min", -1.5 -> "-1 h 30 min")
function formatHoursMin(decimalHours) {
if (decimalHours == null || !Number.isFinite(Number(decimalHours))) return '0 h 0 min';
if (decimalHours == null || !Number.isFinite(Number(decimalHours))) return '0h 0min';
const n = Number(decimalHours);
const sign = n < 0 ? -1 : 1;
const absVal = Math.abs(n);
@@ -145,7 +145,7 @@ function formatHoursMin(decimalHours) {
min = 0;
}
const prefix = sign < 0 ? '-' : '';
return prefix + h + ' h ' + min + ' min';
return prefix + h + 'h ' + min + 'min';
}
module.exports = {