diff --git a/package.json b/package.json index 66c089e..2cbb9c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my-weekly-todo-list", - "version": "1.49.0", + "version": "1.49.1", "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": { diff --git a/src/components/WeeklyView.tsx b/src/components/WeeklyView.tsx index 1da3015..7a0cdeb 100644 --- a/src/components/WeeklyView.tsx +++ b/src/components/WeeklyView.tsx @@ -1400,8 +1400,10 @@ function formatHour(hour: number, minutes: number = 0, format: "short" | "full" const m = minutes > 0 ? `:${minutes.toString().padStart(2, "0")}` : ""; return format === "full" || minutes > 0 ? `${h}:${minutes.toString().padStart(2, "0")} ${ampm}` : `${h}${m} ${ampm}`; } - // 24h format: always show minutes if non-zero, or if format is full. - // Standardize to always include :00 for the hour start to avoid ambiguity. + // 24h format + if (format === "short" && minutes === 0) { + return `${hour}`; + } return `${hour.toString().padStart(2, "0")}:${minutes.toString().padStart(2, "0")}`; }