Skip to content

Commit 4fbee1f

Browse files
feat: improve date formatting look, fix lint
1 parent fa0efe1 commit 4fbee1f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/routes/package/[...package]/+page.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
<div class="my-8 flex gap-8">
6262
<div>
6363
<h1 class="text-3xl font-semibold text-primary text-shadow-sm md:text-5xl">
64+
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
6465
{@html data.currentPackage.pkg.name.replace(/\//g, "/<wbr />")}
6566
</h1>
6667
<h2 class="text-xl text-muted-foreground text-shadow-sm/5">

src/routes/package/[...package]/ReleaseCard.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
const days = Math.floor(hours / 24);
7373
const months = Math.floor(days / 30);
7474
const years = Math.floor(months / 12);
75-
const formatter = new Intl.RelativeTimeFormat(locale);
75+
const formatter = new Intl.RelativeTimeFormat(locale, { numeric: "auto" });
7676
7777
if (years > 0) {
7878
return formatter.format(0 - years, "year");

0 commit comments

Comments
 (0)