const dateFormat = (dates) => {
const date = new Date("2024-08-07")
let formattedDate = date.toLocaleDateString("en-US", {
month: "short",
day: "2-digit",
})
formattedDate = formattedDate.replace(/-/g, " ")
console.log(formattedDate) // Aug 07
}
将月日转换为 英文月缩写+日期
于 2024-08-07 15:42:34 首次发布