From edae04057d92a24fee1f0a560824e9af4e98d4e9 Mon Sep 17 00:00:00 2001 From: Chris Parsons Date: Wed, 17 Jun 2026 18:58:03 -0700 Subject: [PATCH] Fix lint: move pad helper to module scope in date-utils Co-Authored-By: Claude Sonnet 4.6 --- app/lib/date-utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/lib/date-utils.ts b/app/lib/date-utils.ts index 8eea878..9ee07f1 100644 --- a/app/lib/date-utils.ts +++ b/app/lib/date-utils.ts @@ -18,6 +18,8 @@ */ import { format } from "date-fns"; +const pad = (n: number) => String(n).padStart(2, "0"); + /** * Format a YYYY-MM-DD date string for display (e.g. "Apr 9"). * Returns null when the value is missing or unparseable — callers decide how to handle that case. @@ -75,7 +77,6 @@ export function utcIsoToLocalDateTime(value: string | Date | null | undefined): if (!value) return ""; const date = value instanceof Date ? value : new Date(value); if (isNaN(date.getTime())) return ""; - const pad = (n: number) => String(n).padStart(2, "0"); const year = date.getFullYear(); const month = pad(date.getMonth() + 1); const day = pad(date.getDate());