Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-18 18:33:38 +00:00
co-authored by renee-png
parent ca46507f7b
commit d7c6f8eeee
+7
View File
@@ -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;
}