Generate Formatted Date
![Generate Formatted Date](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F5ec749u0%2Fproduction%2F9aa32ff62cbad16019cfa49aef25b6ff0997d46c-200x200.png&w=128&q=75)
It generate the Date like Jan 14, 2023.
export function getFormattedDate(date) {
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'];
const newDate = new Date(date)
return `${months[newDate.getMonth()]} ${newDate.getDate()}, ${newDate.getFullYear()}`;
}