export function invertDate(date = "") { const regex = /-|\//g; const [day = "", month = " ", year = ""] = date.split(regex); const invertedDate = `${year}-${month}-${day}`; return invertedDate; }