Jacky Zhao
2023-08-21 173ec240d2ed5b25f18ef42823334ae800b3527d
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)}</>
}