From 232652149a287054df7e7c5136dafd3f55a79bf0 Mon Sep 17 00:00:00 2001
From: Sohaib <98542228+sohaibology@users.noreply.github.com>
Date: Tue, 15 Aug 2023 00:59:47 +0000
Subject: [PATCH] Update hosting.md (#371)

---
 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