Jacky Zhao
2023-08-20 eb4d3dc5b405fda29ccde917902483a76835894c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
interface Props {
  date: Date
}
 
export function formatDate(d: Date): string {
  return d.toLocaleDateString("en-US", {
    year: "numeric",
    month: "short",
    day: "2-digit",
  })
}
 
export function Date({ date }: Props) {
  return <>{formatDate(date)}</>
}