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