Jacky Zhao
2023-08-20 cfb7d1232e005736dc549fb24ec5a02d53fc5206
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)}</>
}