Skip to content

Commit c7a170e

Browse files
feat(web): 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 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 06acea2 commit c7a170e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/web/src/app/[domain]/components/DisplayDate.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ interface DisplayDateProps {
1919
}
2020

2121
export const DisplayDate = ({ date, className }: DisplayDateProps) => {
22+
// Format date in ISO8601 (UTC) format
23+
const iso8601Date = date.toISOString()
24+
2225
return (
2326
<TooltipProvider>
2427
<Tooltip>
@@ -28,9 +31,9 @@ export const DisplayDate = ({ date, className }: DisplayDateProps) => {
2831
</span>
2932
</TooltipTrigger>
3033
<TooltipContent>
31-
<p>{formatFullDate(date)}</p>
34+
<p>{iso8601Date}</p>
3235
</TooltipContent>
3336
</Tooltip>
3437
</TooltipProvider>
3538
)
36-
}
39+
}

0 commit comments

Comments
 (0)