# Pastebin jIwC7Kz5 function formatDate(date) { const y = date.getFullYear(); const m = `0${date.getMonth() + 1}`.slice(0, 2); const d = `0${date.getdate()}`.slice(0, 2); return `${y}-${m}-${d}`; }