fix: display midnight hour as "00" instead of "0" in time grid

v1.75.4

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
mARTin 2026-03-26 10:59:36 +01:00
parent 77e8e87b90
commit 94747a9508
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "my-weekly-todo-list",
"version": "1.75.3",
"version": "1.75.4",
"description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view",
"main": "index.js",
"scripts": {

View File

@ -1440,7 +1440,7 @@ function formatHour(hour: number, minutes: number = 0, format: "short" | "full"
}
// 24h format
if (format === "short" && minutes === 0) {
return `${hour}`;
return hour === 0 ? "00" : `${hour}`;
}
return `${hour.toString().padStart(2, "0")}:${minutes.toString().padStart(2, "0")}`;
}