mirror of
https://github.com/r-freeman/portfolio.git
synced 2024-11-26 03:55:41 +00:00
9 lines
232 B
TypeScript
9 lines
232 B
TypeScript
export function formatDate(dateString: string) {
|
|
return new Date(`${dateString}T00:00:00Z`).toLocaleDateString('en-IE', {
|
|
day: 'numeric',
|
|
month: 'long',
|
|
year: 'numeric',
|
|
timeZone: 'UTC',
|
|
})
|
|
}
|