change reading time to content meta

This commit is contained in:
Jacky Zhao 2023-08-08 21:28:09 -07:00
parent ee9ed4f287
commit e21f0f9bb9
5 changed files with 40 additions and 31 deletions
quartz/components

View file

@ -2,11 +2,14 @@ interface Props {
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)}</>
}