From 8200c8d0402cb40e9f65c49dac5be621360a3a20 Mon Sep 17 00:00:00 2001
From: bfahrenfort <59982409+bfahrenfort@users.noreply.github.com>
Date: Thu, 24 Aug 2023 05:57:49 +0000
Subject: [PATCH] Revert contentIndex to RSS 2.0 (#407)
---
quartz/components/Date.tsx | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/quartz/components/Date.tsx b/quartz/components/Date.tsx
index 16c4544..f4b284a 100644
--- a/quartz/components/Date.tsx
+++ b/quartz/components/Date.tsx
@@ -2,11 +2,14 @@
date: Date
}
-export function Date({ date }: Props) {
- const formattedDate = date.toLocaleDateString("en-US", {
+export function formatDate(d: Date): string {
+ return d.toLocaleDateString("en-US", {
year: "numeric",
month: "short",
day: "2-digit",
})
- return <>{formattedDate}</>
+}
+
+export function Date({ date }: Props) {
+ return <>{formatDate(date)}</>
}
--
Gitblit v1.10.0