format date function

PHOTO EMBED

Sun Feb 11 2024 00:22:06 GMT+0000 (Coordinated Universal Time)

Saved by @davidmchale #format #date #js #time

const formatDate = (date) =>
  new Intl.DateTimeFormat("en", {
    day: "numeric",
    month: "long",
    year: "numeric",
    weekday: "long",
  }).format(new Date(date));


  export default formatDate
content_copyCOPY