change reading time to content meta
This commit is contained in:
1 parent
ee9ed4f287
commit
e21f0f9bb9
5 files changed
+40
-31
No files matched your search
@@ -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)}</>
|
||||
}
|
||||
Reference in new issue
Block a user