Format date in Javascript

Javascript

today = new Date()

// to get a nice formatted date like 12 March, 2023 you can do the following
formattedDate = today.toLocaleDateString("en-US", {
    month: "short",
    day: "2-digit",
    year: "numeric",
})

console.log(formattedDate)