JSFiddle - React, Tailwind, and code Playground JavaScript var a = new Date(); var b = a.toLocaleDateString(); var c = new Date(a); alert(c);