JSFiddle - React, Tailwind, and code Playground JavaScript cur = new Date(); console.log(cur.getFullYear()+'-'+(cur.getMonth()+1)+'-'+cur.getDate());