const dateFormat = date => { const [d,m,y] = date.toLocaleDateString("ru").split("."); return `${y}-${m}-${d}` }