5 lines
195 B
TypeScript
5 lines
195 B
TypeScript
|
export function formatDate(date: Date): string {
|
||
|
const options = { year: "numeric", month: "long", day: "numeric" } as const;
|
||
|
return new Intl.DateTimeFormat("en-US", options).format(date);
|
||
|
}
|