aboutsummaryrefslogtreecommitdiff
path: root/apps/website/src/components/base
diff options
context:
space:
mode:
Diffstat (limited to 'apps/website/src/components/base')
-rw-r--r--apps/website/src/components/base/FormattedDate.astro17
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/website/src/components/base/FormattedDate.astro b/apps/website/src/components/base/FormattedDate.astro
new file mode 100644
index 0000000..1bcce73
--- /dev/null
+++ b/apps/website/src/components/base/FormattedDate.astro
@@ -0,0 +1,17 @@
+---
+interface Props {
+ date: Date;
+}
+
+const { date } = Astro.props;
+---
+
+<time datetime={date.toISOString()}>
+ {
+ date.toLocaleDateString('en-us', {
+ year: 'numeric',
+ month: 'short',
+ day: 'numeric',
+ })
+ }
+</time>