From d7c6f8eeee222c97680b595424b364104cbb07ca Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 18:33:38 +0000 Subject: [PATCH] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/lib/timer.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/timer.tsx b/src/lib/timer.tsx index d2e2ecf..210e0db 100644 --- a/src/lib/timer.tsx +++ b/src/lib/timer.tsx @@ -184,3 +184,10 @@ export function roundToTenth(hours: number): number { if (!hours || hours <= 0) return 0; return Math.max(0.1, Math.round(Math.ceil(hours * 10)) / 10); } + +/** Round hours UP to the nearest 1/6 hour (10-minute) increment, with 1/6 minimum. */ +export function roundToSixth(hours: number): number { + if (!hours || hours <= 0) return 0; + const sixths = Math.max(1, Math.ceil(hours * 6)); + return Math.round((sixths / 6) * 1000) / 1000; +}