Skip to content

Commit cc1bce6

Browse files
committed
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
1 parent 06acea2 commit cc1bce6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
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,7 +31,7 @@ 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>

0 commit comments

Comments
 (0)