From d9e874b07da4ef66afb76cffd76d3c7a660ae8d3 Mon Sep 17 00:00:00 2001 From: William Zhang Date: Sat, 14 Feb 2026 12:40:13 -0500 Subject: [PATCH] Issue 32: Add ISO8601 timestamp to date display title attribute Add ISO8601 (UTC) formatted timestamp as a native browser tooltip on all date displays. This allows users to easily copy the exact timestamp while still seeing human-readable relative times and formatted dates in the custom tooltip. Fixes #32 --- .../src/app/[domain]/components/DisplayDate.tsx | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/packages/web/src/app/[domain]/components/DisplayDate.tsx b/packages/web/src/app/[domain]/components/DisplayDate.tsx index da108b959..708bfae40 100644 --- a/packages/web/src/app/[domain]/components/DisplayDate.tsx +++ b/packages/web/src/app/[domain]/components/DisplayDate.tsx @@ -1,24 +1,15 @@ import { getFormattedDate } from "@/lib/utils" import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip" -const formatFullDate = (date: Date) => { - return new Intl.DateTimeFormat("en-US", { - month: "long", - day: "numeric", - year: "numeric", - hour: "numeric", - minute: "2-digit", - second: "2-digit", - timeZoneName: "short", - }).format(date) -} - interface DisplayDateProps { date: Date className?: string } export const DisplayDate = ({ date, className }: DisplayDateProps) => { + // Format date in ISO8601 (UTC) format + const iso8601Date = date.toISOString() + return ( @@ -28,7 +19,7 @@ export const DisplayDate = ({ date, className }: DisplayDateProps) => { -

{formatFullDate(date)}

+

{iso8601Date}