Skip to content

Commit e2e491c

Browse files
committed
more useful title
1 parent de61946 commit e2e491c

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

apps/svelte.dev/src/routes/packages/PackageCard.svelte

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88
};
99
1010
let { pkg }: Props = $props();
11+
12+
const formatter = new Intl.DateTimeFormat(undefined, {
13+
weekday: 'short',
14+
year: 'numeric',
15+
month: 'short',
16+
day: 'numeric',
17+
hour: 'numeric',
18+
minute: 'numeric'
19+
});
1120
</script>
1221

1322
<article data-pubdate={pkg.updated}>
@@ -37,7 +46,10 @@
3746
{/if}
3847
<span class="updated">
3948
{pkg.version}
40-
<strong title={pkg.updated}>{ago(new Date(pkg.updated), true)}</strong>
49+
50+
<strong title={formatter.format(new Date(pkg.updated))}>
51+
{ago(new Date(pkg.updated), true)}
52+
</strong>
4153
</span>
4254
</header>
4355

0 commit comments

Comments
 (0)