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 | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/quartz/components/Date.tsx b/quartz/components/Date.tsx
index 7ea6ad4..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'
+ day: "2-digit",
})
- return <>{formattedDate}</>
+}
+
+export function Date({ date }: Props) {
+ return <>{formatDate(date)}</>
}
--
Gitblit v1.10.0