Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/utils/Date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@ export const formatAppDateTime = (
hour: 'numeric',
minute: '2-digit',
hour12: true,
timeZoneName: 'short',
}).format(d)
}

// Date only -- for fields like first_visit_date and well_completion_date
// where the time component is not meaningful.
// Handles both YYYY-MM-DD strings (parsed as UTC noon to avoid timezone shift)
// and full ISO datetime strings.
export const formatAppDate = (
value: string | null | undefined
): string => {
export const formatAppDate = (value: string | null | undefined): string => {
if (!value) return ''

const dateOnlyMatch = value.match(DATE_ONLY_PATTERN)
Expand Down
Loading