summaryrefslogtreecommitdiff
path: root/website/src/components/FormattedDate.astro
diff options
context:
space:
mode:
Diffstat (limited to 'website/src/components/FormattedDate.astro')
-rw-r--r--website/src/components/FormattedDate.astro23
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>
-}