diff options
| author | Joe Carstairs <me@joeac.net> | 2026-06-18 19:21:59 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-06-18 19:21:59 +0100 |
| commit | ca8e6824eaa711105f4092365792720c9dde026b (patch) | |
| tree | 2b6493941352d11b799ee63d3f1311c13de649b8 /website/src/components/FormattedDate.astro | |
| parent | a0f25057283a397f006127b6f582d190d2c4294e (diff) | |
remove Astro website
Diffstat (limited to 'website/src/components/FormattedDate.astro')
| -rw-r--r-- | website/src/components/FormattedDate.astro | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/website/src/components/FormattedDate.astro b/website/src/components/FormattedDate.astro deleted file mode 100644 index ce700f1..0000000 --- a/website/src/components/FormattedDate.astro +++ /dev/null @@ -1,23 +0,0 @@ ---- -interface Props { - className?: string; - date: Date | string; - hidden?: boolean; -} - -let { className, date, hidden } = Astro.props; -if (typeof(date) === 'string') { - date = new Date(date); -} -const dateStr = - date.toLocaleDateString('en-GB', { - year: 'numeric', - month: 'long', - day: 'numeric', - }); ---- - -{ hidden - ? <time datetime={date.toISOString()} class={className ?? ''} hidden>{dateStr}</time> - : <time datetime={date.toISOString()} class={className ?? ''}>{dateStr}</time> -} |
